diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2021-06-21 15:16:51 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-07-07 20:08:12 +0200 |
commit | a2e44296c9cf36ff1269ccfb427b90b5a848ee7d (patch) | |
tree | a2c5305da5f6ea31a658db997880919f70506c38 /run_project_tests.py | |
parent | 7126fbaf81b4b77da36a6e0995f234bd293db663 (diff) | |
download | meson-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-x | run_project_tests.py | 11 |
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) |