diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-01-10 23:00:36 -0500 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2023-02-19 02:55:56 +0530 |
commit | 51fe09d861a54f5d74810cd0aadbce5b4a5bd105 (patch) | |
tree | 203d194cde4170f6bf8ec6caeb024dd178b5d57f | |
parent | f1e67dd6f9d1e9c98a02584c7b6a381b0bea289b (diff) | |
download | meson-51fe09d861a54f5d74810cd0aadbce5b4a5bd105.zip meson-51fe09d861a54f5d74810cd0aadbce5b4a5bd105.tar.gz meson-51fe09d861a54f5d74810cd0aadbce5b4a5bd105.tar.bz2 |
tests: properly log the reason why a test got unexpectedly skipped
-rwxr-xr-x | run_project_tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/run_project_tests.py b/run_project_tests.py index ce913f9..99e4978 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -1330,7 +1330,7 @@ def _run_tests(all_tests: T.List[T.Tuple[str, T.List[TestDef], bool]], if not skip_as_expected: failing_tests += 1 if is_skipped: - skip_msg = 'Test asked to be skipped, but was not expected to' + skip_msg = f'Test asked to be skipped ({skip_reason}), but was not expected to' status = TestStatus.UNEXSKIP else: skip_msg = 'Test ran, but was expected to be skipped' @@ -1338,6 +1338,7 @@ def _run_tests(all_tests: T.List[T.Tuple[str, T.List[TestDef], bool]], result.msg = f"{skip_msg} for MESON_CI_JOBNAME '{ci_jobname}'" f.update_log(status) + safe_print(bold('Reason:'), result.msg) current_test = ET.SubElement(current_suite, 'testcase', {'name': testname, 'classname': t.category}) ET.SubElement(current_test, 'failure', {'message': result.msg}) continue |