appveyor: run unit tests via matrix 'only' setting

This commit is contained in:
Ralph Lange
2020-03-27 16:32:54 +01:00
parent a006293461
commit fc141f874a
2 changed files with 19 additions and 11 deletions

View File

@@ -95,14 +95,27 @@ matrix:
- platform: x64
CC: vs2008
# Run test script for unit tests (SET = test00)
for:
-
matrix:
only:
- SET: test00
build_script:
- cmd: python appveyor-test.py
test_script:
- cmd: echo Tests have been run in the build phase
#---------------------------------#
# building & testing #
#---------------------------------#
build_script:
- cmd: python appveyor-test.py
- cmd: python appveyor/do.py prepare
- cmd: python appveyor/do.py build
test_script:
- cmd: python appveyor/do.py test
#---------------------------------#
# debugging #

View File

@@ -248,14 +248,9 @@ class TestVCVars(unittest.TestCase):
do.with_vcvars('env')
if __name__ == "__main__":
if 'SET' in os.environ and os.environ['SET'] == "test00":
do.host_info()
if sys.argv[1:]==['env']:
# testing with_vcvars
[print(K,'=',V) for K, V in os.environ.items()]
else:
unittest.main()
do.host_info()
if sys.argv[1:]==['env']:
# testing with_vcvars
[print(K,'=',V) for K, V in os.environ.items()]
else:
do.main(['prepare'])
do.main(['build'])
do.main(['test'])
unittest.main()