diff options
author | David Srbecky <dsrbecky@google.com> | 2021-04-30 12:22:50 +0100 |
---|---|---|
committer | Treehugger Robot <treehugger-gerrit@google.com> | 2021-04-30 18:15:58 +0000 |
commit | 0849c1ca7b10a859d2ce3d2bd84a9b612fbb36e3 (patch) | |
tree | 7b4427ba82faba85130bea42e2e595a02ba9178a /tools | |
parent | 889da94a5931a68ca527dc7320ff0b5de69917fc (diff) |
Tweak run-libcore-tests.py output formatting.
Test: art/tools/run-libcore-tests.py --mode=host
Change-Id: Idfd90344f815c06d66428f211c2a91f473044c44
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/run-libcore-tests.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/run-libcore-tests.py b/tools/run-libcore-tests.py index 661a98a1e3..19aeb13701 100755 --- a/tools/run-libcore-tests.py +++ b/tools/run-libcore-tests.py @@ -242,18 +242,21 @@ def main(): failed_tests, max_exit_code = [], 0 with concurrent.futures.ThreadPoolExecutor(max_workers=args.jobs) as pool: futures = [pool.submit(run_test, test_name) for test_name in get_test_names()] - print(f"Running {len(futures)} tasks on {args.jobs} core(s)...") + print(f"Running {len(futures)} tasks on {args.jobs} core(s)...\n") for i, future in enumerate(concurrent.futures.as_completed(futures)): test_name, cmd, stdout, exit_code = future.result() - print(f"\n[{i+1}/{len(futures)}] {test_name} " + ("FAIL" if exit_code != 0 else "PASS")) if exit_code != 0 or args.dry_run: print(cmd) - print(stdout) + print(stdout.strip()) else: print(stdout.strip().split("\n")[-1]) # Vogar final summary line. - failed_tests.extend(failed_regex.findall(stdout)) + failed_match = failed_regex.findall(stdout) + failed_tests.extend(failed_match) max_exit_code = max(max_exit_code, exit_code) - print("\n" + "\n".join(failed_tests)) + result = "PASSED" if exit_code == 0 else f"FAILED ({len(failed_match)} test(s) failed)" + print(f"[{i+1}/{len(futures)}] Test set {test_name} {result}\n") + print(f"Overall, {len(failed_tests)} test(s) failed:") + print("\n".join(failed_tests)) sys.exit(max_exit_code) if __name__ == '__main__': |