Skip to content

Commit

Permalink
ci: Use test.json to skip VS2017 azure tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mensinda authored and nirbheek committed Jun 15, 2020
1 parent eab0e5a commit a44dc67
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
10 changes: 5 additions & 5 deletions run_project_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,11 +669,6 @@ def gather_tests(testdir: Path, stdout_mandatory: bool) -> T.List[TestDef]:
assert "val" in i
skip = False

# Add an empty matrix entry
if i['val'] is None:
tmp_opts += [(None, False)]
continue

# Skip the matrix entry if environment variable is present
if 'skip_on_env' in i:
for skip_env_var in i['skip_on_env']:
Expand All @@ -687,6 +682,11 @@ def gather_tests(testdir: Path, stdout_mandatory: bool) -> T.List[TestDef]:
skip = True
break

# Add an empty matrix entry
if i['val'] is None:
tmp_opts += [(None, skip)]
continue

tmp_opts += [('{}={}'.format(key, i['val']), skip)]

if opt_list:
Expand Down
7 changes: 0 additions & 7 deletions test cases/cmake/2 advanced/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ if not dep_test.found()
error('MESON_SKIP_TEST: zlib is not installed')
endif

py3 = import('python').find_installation('python3')
get_envvar = '''import os, sys; print(os.environ.get('@0@', 0), end='')'''
# Remove this env var from azure-pipelines.yml when fixed
if run_command(py3, '-c', get_envvar.format('CI_JOB_VS2017')).stdout() == '1'
error('MESON_SKIP_TEST: broken for vs2017 jobs')
endif

cm = import('cmake')

# Test the "normal" subproject call
Expand Down
5 changes: 5 additions & 0 deletions test cases/cmake/2 advanced/test.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"matrix": {
"options": {
"_": [{"val": null, "skip_on_env": ["CI_JOB_VS2017"]}]
}
},
"installed": [
{"type": "expr", "file": "usr/?lib/libcm_cmModLib?so"},
{"type": "implib", "platform": "cygwin", "file": "usr/lib/libcm_cmModLib"},
Expand Down
7 changes: 0 additions & 7 deletions test cases/cmake/5 object library/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ if not dep_test.found()
error('MESON_SKIP_TEST: zlib is not installed')
endif

py3 = import('python').find_installation('python3')
get_envvar = '''import os, sys; print(os.environ.get('@0@', 0), end='')'''
# Remove this env var from azure-pipelines.yml when fixed
if run_command(py3, '-c', get_envvar.format('CI_JOB_VS2017')).stdout() == '1'
error('MESON_SKIP_TEST: broken for vs2017 jobs')
endif

cm = import('cmake')

sub_pro = cm.subproject('cmObjLib')
Expand Down
7 changes: 7 additions & 0 deletions test cases/cmake/5 object library/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"matrix": {
"options": {
"_": [{"val": null, "skip_on_env": ["CI_JOB_VS2017"]}]
}
}
}

0 comments on commit a44dc67

Please sign in to comment.