chore: print test list at beginning and end of run_suite.py (#16334)

Co-authored-by: Mick <mickjagger19@icloud.com>
This commit is contained in:
Alison Shao
2026-01-04 11:52:52 -08:00
committed by GitHub
parent ff0f370f85
commit 52c604342c
2 changed files with 48 additions and 1 deletions

View File

@@ -14,6 +14,8 @@ import subprocess
import sys
from pathlib import Path
import tabulate
from sglang.multimodal_gen.runtime.utils.logging_utils import init_logger
logger = init_logger(__name__)
@@ -256,6 +258,15 @@ def main():
if i % args.total_partitions == args.partition_id
]
# Print test info at beginning (similar to test/run_suite.py pretty_print_tests)
partition_info = f"{args.partition_id + 1}/{args.total_partitions} (0-based id={args.partition_id})"
headers = ["Suite", "Partition"]
rows = [[args.suite, partition_info]]
msg = tabulate.tabulate(rows, headers=headers, tablefmt="psql") + "\n"
msg += f"✅ Enabled {len(my_items)} test(s):\n"
for item in my_items:
msg += f" - {item}\n"
print(msg, flush=True)
print(
f"Suite: {args.suite} | Partition: {args.partition_id}/{args.total_partitions}"
)
@@ -271,6 +282,14 @@ def main():
# 4. execute with the specific test items
exit_code = run_pytest(my_items)
# Print tests again at the end for visibility
msg = "\n" + tabulate.tabulate(rows, headers=headers, tablefmt="psql") + "\n"
msg += f"✅ Executed {len(my_items)} test(s):\n"
for item in my_items:
msg += f" - {item}\n"
print(msg, flush=True)
sys.exit(exit_code)