diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-08-17 20:44:42 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-08-17 21:30:32 -0400 |
commit | 1fd70a2a004900b7d97d9fc560e87d33266ecfed (patch) | |
tree | 6d4f762d8ed93370f0a228ec56db55f3e9b235ef /run_tests.py | |
parent | 98232eb0364238958996a192d2452ea3b4f8879b (diff) | |
download | meson-1fd70a2a004900b7d97d9fc560e87d33266ecfed.zip meson-1fd70a2a004900b7d97d9fc560e87d33266ecfed.tar.gz meson-1fd70a2a004900b7d97d9fc560e87d33266ecfed.tar.bz2 |
tests: consolidate MESON_SKIP_TEST reporting and use it in unittests
Previously, we only reported the skip reason when running project tests.
Diffstat (limited to 'run_tests.py')
-rwxr-xr-x | run_tests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/run_tests.py b/run_tests.py index cf06337..699e293 100755 --- a/run_tests.py +++ b/run_tests.py @@ -187,6 +187,15 @@ if mesonlib.is_windows() or mesonlib.is_cygwin(): else: exe_suffix = '' +def handle_meson_skip_test(out: str) -> T.Tuple[bool, str]: + for line in out.splitlines(): + for prefix in {'Problem encountered', 'Assert failed', 'Failed to configure the CMake subproject'}: + if f'{prefix}: MESON_SKIP_TEST' in line: + offset = line.index('MESON_SKIP_TEST') + 16 + reason = line[offset:].strip() + return (True, reason) + return (False, '') + def get_meson_script() -> str: ''' Guess the meson that corresponds to the `mesonbuild` that has been imported |