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_single_test.py | |
| parent | 98232eb0364238958996a192d2452ea3b4f8879b (diff) | |
| download | meson-1fd70a2a004900b7d97d9fc560e87d33266ecfed.tar.gz | |
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_single_test.py')
| -rwxr-xr-x | run_single_test.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/run_single_test.py b/run_single_test.py index eb9379acc..5cd4f5e9f 100755 --- a/run_single_test.py +++ b/run_single_test.py @@ -13,7 +13,8 @@ import pathlib import typing as T from mesonbuild import mlog -from run_project_tests import TestDef, load_test_json, run_test, BuildStep, test_emits_skip_msg +from run_tests import handle_meson_skip_test +from run_project_tests import TestDef, load_test_json, run_test, BuildStep from run_project_tests import setup_commands, detect_system_compiler, print_tool_versions if T.TYPE_CHECKING: @@ -69,15 +70,7 @@ def main() -> None: is_skipped = True skip_reason = 'not run because preconditions were not met' else: - for l in result.stdo.splitlines(): - if test_emits_skip_msg(l): - is_skipped = True - offset = l.index('MESON_SKIP_TEST') + 16 - skip_reason = l[offset:].strip() - break - else: - is_skipped = False - skip_reason = '' + is_skipped, skip_reason = handle_meson_skip_test(result.stdo) if is_skipped: msg = mlog.yellow('SKIP:') |
