From 9abd85bfcf50c0470cb707889f1d7efd4e6e9716 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Mon, 12 Feb 2024 17:20:41 -0600 Subject: [PATCH] Code cleanup --- test/run_tests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/run_tests.py b/test/run_tests.py index 119ee53c6..3bca7e1d4 100755 --- a/test/run_tests.py +++ b/test/run_tests.py @@ -107,11 +107,14 @@ def test_failed(test_names, return_code): failed_tests.extend(run_tests(args, tests)) if failed_tests: - failed_tests = [] + retried_failed_tests = [] for test in failed_tests: print(f'\n\nRerunning {test}\n') - failed_tests.extend(run_tests(args, [test], show_output=True)) + retried_failed_tests.extend(run_tests(args, [test], show_output=True)) # + failed_tests = retried_failed_tests + + if failed_tests: print(f'Failed tests (logged to {LOGFILE}):\n' + '\n'.join(failed_tests)) else: print(f'All {len(all_tests)} tests complete successfully.')