forked from platformio/platformio-core
Test only 1 project example per dev/platform for AppVeyor CI
This commit is contained in:
@ -11,8 +11,6 @@ environment:
|
||||
install:
|
||||
- cmd: git submodule update --init --recursive
|
||||
- cmd: SET PATH=C:\MinGW\bin;%PATH%
|
||||
- if %PLATFORM% == x64 SET PATH=C:\Python27-x64;C:\Python27-x64\Scripts;%PATH%
|
||||
- if %PLATFORM% == x86 SET PATH=C:\Python27;C:\Python27\Scripts;%PATH%
|
||||
- cmd: pip install tox
|
||||
|
||||
test_script:
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
import random
|
||||
from glob import glob
|
||||
from os import listdir, walk
|
||||
from os import getenv, listdir, walk
|
||||
from os.path import dirname, getsize, isdir, isfile, join, normpath
|
||||
|
||||
import pytest
|
||||
@ -54,11 +54,16 @@ def pytest_generate_tests(metafunc):
|
||||
continue
|
||||
platform_examples.append(root)
|
||||
|
||||
# test random 3 examples
|
||||
random.shuffle(platform_examples)
|
||||
project_dirs.extend(platform_examples[:3])
|
||||
project_dirs.sort()
|
||||
metafunc.parametrize("pioproject_dir", project_dirs)
|
||||
|
||||
if getenv("APPVEYOR"):
|
||||
# use only 1 example for AppVeyor CI
|
||||
project_dirs.append(platform_examples[0])
|
||||
else:
|
||||
# test random 3 examples
|
||||
project_dirs.extend(platform_examples[:3])
|
||||
|
||||
metafunc.parametrize("pioproject_dir", sorted(project_dirs))
|
||||
|
||||
|
||||
@pytest.mark.examples
|
||||
|
Reference in New Issue
Block a user