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: install:
- cmd: git submodule update --init --recursive - cmd: git submodule update --init --recursive
- cmd: SET PATH=C:\MinGW\bin;%PATH% - 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 - cmd: pip install tox
test_script: test_script:

View File

@ -14,7 +14,7 @@
import random import random
from glob import glob 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 from os.path import dirname, getsize, isdir, isfile, join, normpath
import pytest import pytest
@ -54,11 +54,16 @@ def pytest_generate_tests(metafunc):
continue continue
platform_examples.append(root) platform_examples.append(root)
# test random 3 examples
random.shuffle(platform_examples) random.shuffle(platform_examples)
project_dirs.extend(platform_examples[:3])
project_dirs.sort() if getenv("APPVEYOR"):
metafunc.parametrize("pioproject_dir", project_dirs) # 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 @pytest.mark.examples