From 5f5a567768782d8d1a2442f7f216de2dddfc3f80 Mon Sep 17 00:00:00 2001 From: Liangsheng Yin Date: Wed, 24 Dec 2025 11:55:59 +0800 Subject: [PATCH] Tiny add flush in the suite partition status print. (#15719) --- test/run_suite.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/test/run_suite.py b/test/run_suite.py index 56a60eb7a..af9cab301 100644 --- a/test/run_suite.py +++ b/test/run_suite.py @@ -126,26 +126,27 @@ def pretty_print_tests( headers = ["Hardware", "Suite", "Nightly", "Partition"] rows = [[hw.name, suite, str(nightly), partition_info]] - msg = tabulate.tabulate(rows, headers=headers, tablefmt="psql") - print(msg + "\n") + msg = tabulate.tabulate(rows, headers=headers, tablefmt="psql") + "\n" if skipped_tests: - print(f"⚠️ Skipped {len(skipped_tests)} test(s):") + msg += f"⚠️ Skipped {len(skipped_tests)} test(s):\n" for t in skipped_tests: reason = t.disabled or "disabled" - print(f" - {t.filename} (reason: {reason})") - - print() + msg += f" - {t.filename} (reason: {reason})\n" + msg += "\n" if len(ci_tests) == 0: - print(f"No tests found for hw={hw.name}, suite={suite}, nightly={nightly}") - print("This is expected during incremental migration. Skipping.") - return + msg += f"No tests found for hw={hw.name}, suite={suite}, nightly={nightly}\n" + msg += "This is expected during incremental migration. Skipping.\n" + else: + total_est_time = sum(t.est_time for t in ci_tests) + msg += ( + f"✅ Enabled {len(ci_tests)} test(s) (est total {total_est_time:.1f}s):\n" + ) + for t in ci_tests: + msg += f" - {t.filename} (est_time={t.est_time})\n" - total_est_time = sum(t.est_time for t in ci_tests) - print(f"✅ Enabled {len(ci_tests)} test(s) (est total {total_est_time:.1f}s):") - for t in ci_tests: - print(f" - {t.filename} (est_time={t.est_time})") + print(msg, flush=True) def run_a_suite(args):