Test only 1 project example per dev/platform for AppVeyor CI

This commit is contained in:
Ivan Kravets
2019-05-27 18:17:57 +03:00
parent a0fb88e28a
commit 078b0af312
2 changed files with 10 additions and 7 deletions

View File

@ -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:

View File

@ -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