aboutsummaryrefslogtreecommitdiff
path: root/run_project_tests.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2021-06-21 15:16:51 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2021-07-07 20:08:12 +0200
commita2e44296c9cf36ff1269ccfb427b90b5a848ee7d (patch)
treea2c5305da5f6ea31a658db997880919f70506c38 /run_project_tests.py
parent7126fbaf81b4b77da36a6e0995f234bd293db663 (diff)
downloadmeson-a2e44296c9cf36ff1269ccfb427b90b5a848ee7d.zip
meson-a2e44296c9cf36ff1269ccfb427b90b5a848ee7d.tar.gz
meson-a2e44296c9cf36ff1269ccfb427b90b5a848ee7d.tar.bz2
Add `skip_on_os` to test.json
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-xrun_project_tests.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/run_project_tests.py b/run_project_tests.py
index 73e85fa..ec356c4 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -779,6 +779,17 @@ def load_test_json(t: TestDef, stdout_mandatory: bool) -> T.List[TestDef]:
else:
skip_expected = False
+ # Test is expected to skip if os matches
+ if 'skip_on_os' in test_def:
+ mesonenv = environment.Environment(None, None, get_fake_options('/'))
+ for skip_os in test_def['skip_on_os']:
+ if skip_os.startswith('!'):
+ if mesonenv.machines.host.system != skip_os[1:]:
+ skip_expected = True
+ else:
+ if mesonenv.machines.host.system == skip_os:
+ skip_expected = True
+
# Skip the matrix code and just update the existing test
if 'matrix' not in test_def:
t.env.update(env)