From 078b0af3122e08a3a83e8a7aac27ca4a5a02175c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 27 May 2019 18:17:57 +0300 Subject: [PATCH] Test only 1 project example per dev/platform for AppVeyor CI --- .appveyor.yml | 2 -- tests/test_examples.py | 15 ++++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index ee0986dc..fcaaeaaf 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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: diff --git a/tests/test_examples.py b/tests/test_examples.py index 3f34433b..f2469f8f 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -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