diff options
author | Eli Schwartz <eschwartz93@gmail.com> | 2023-08-30 13:36:31 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-09-01 14:27:53 -0400 |
commit | 12e23f55d4e1789da822d7ea543dc89662503ad7 (patch) | |
tree | 8c543b0b95ee14a6e63b5bcd2dc0f5dc9a557126 /run_project_tests.py | |
parent | 025bcc0d9d1f7ebdc3ba483ef77bc515327364bf (diff) | |
download | meson-12e23f55d4e1789da822d7ea543dc89662503ad7.zip meson-12e23f55d4e1789da822d7ea543dc89662503ad7.tar.gz meson-12e23f55d4e1789da822d7ea543dc89662503ad7.tar.bz2 |
tests: make run_project_tests finish off the verbose logs with a summary
List each testcase name that failed so we can see at a glance which ones
they are.
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-x | run_project_tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/run_project_tests.py b/run_project_tests.py index f279332..042bcf1 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -300,6 +300,7 @@ class TestDef: return (s_id, self.path, self.name or '') < (o_id, other.path, other.name or '') return NotImplemented +failing_testcases: T.List[str] = [] failing_logs: T.List[str] = [] print_debug = 'MESON_PRINT_TEST_OUTPUT' in os.environ under_ci = 'CI' in os.environ @@ -1367,6 +1368,7 @@ def _run_tests(all_tests: T.List[T.Tuple[str, T.List[TestDef], bool]], left_w = max(3, left_w) right_w = cols - left_w - name_len - 2 right_w = max(3, right_w) + failing_testcases.append(name_str) failing_logs.append(f'\n\x1b[31m{"="*left_w}\x1b[0m {name_str} \x1b[31m{"="*right_w}\x1b[0m\n') if result.step == BuildStep.configure and result.mlog != no_meson_log_msg: # For configure failures, instead of printing stdout, @@ -1633,6 +1635,9 @@ if __name__ == '__main__': print(l, '\n') except UnicodeError: print(l.encode('ascii', errors='replace').decode(), '\n') + print('All failures:') + for c in failing_testcases: + print(f' -> {c}') for name, dirs, _ in all_tests: dir_names = list({x.path.name for x in dirs}) for k, g in itertools.groupby(dir_names, key=lambda x: x.split()[0]): |