Skip to content

Commit 415b2c7

Browse files
committed
Address review comments
1 parent 9f4e338 commit 415b2c7

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

tools/scripts/test_runner/lib/test_executor.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ class TestExecutor:
2323
Executes tests and manages build/test workflows
2424
"""
2525

26-
# Exit codes
27-
EXIT_SUCCESS = 0
28-
EXIT_FAILURE = 1
29-
EXIT_TIMEOUT = 124
30-
3126
# Test results
3227
RESULT_PASSED = "PASSED"
3328
RESULT_FAILED = "FAILED"

tools/scripts/test_runner/test_runner.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def main():
2929
# Validate config file exists
3030
if not os.path.exists(args.config):
3131
print(f"ERROR: Configuration file not found: {args.config}")
32+
if args.verbose:
33+
print("Exiting: Missing configuration file")
3234
return
3335

3436
try:
@@ -43,12 +45,16 @@ def main():
4345

4446
# Check environment
4547
if not executor.check_environment():
48+
if args.verbose:
49+
print("Exiting: Environment check failed")
4650
return
4751

4852
# Build RCCL (if not --no-build)
4953
if not args.no_build:
5054
if not executor.build_rccl():
5155
print("ERROR: Build failed")
56+
if args.verbose:
57+
print("Exiting: RCCL build failed")
5258
return
5359

5460
# Parse and run test suites
@@ -90,18 +96,25 @@ def main():
9096
failed = executor.test_results.count(executor.RESULT_FAILED)
9197
timeout = executor.test_results.count(executor.RESULT_TIMEOUT)
9298
if failed > 0 or timeout > 0:
99+
if args.verbose:
100+
print(f"Exiting: Tests failed (failed={failed}, timeout={timeout})")
93101
return
94102

103+
if args.verbose:
104+
print("Exiting: Test run completed successfully")
95105
return
96106

97107
except KeyboardInterrupt:
98108
print("\n\nInterrupted by user")
109+
if args.verbose:
110+
print("Exiting: User interrupted execution")
99111
return
100112
except Exception as e:
101113
print(f"\nERROR: {e}")
102114
if args.verbose:
103115
import traceback
104116
traceback.print_exc()
117+
print("Exiting: Unhandled exception occurred")
105118
return
106119

107120

0 commit comments

Comments
 (0)