Skip to content

Commit

Permalink
[e2e_testing] check process exitcode early in e2e (#3591)
Browse files Browse the repository at this point in the history
It will exit immediately. So it doesn't need to wait 6 min.
  • Loading branch information
qingyunqu authored Aug 5, 2024
1 parent 7e7af67 commit 7030445
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion projects/pt1/python/torch_mlir_e2e_test/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,15 @@ def run_tests(

pool = mp.Pool(num_processes)
arg_list = zip(tests, repeat(config))
pool_copy = pool._pool[:]
handles = pool.starmap_async(compile_and_run_test, arg_list)
results = handles.get(timeout=360)
while not handles.ready():
if any(proc.exitcode for proc in pool_copy):
print("At least one of testing processes has exited with code != 0.")
exit(1)
handles.wait(timeout=1)
else:
results = handles.get(timeout=360)

tests_with_results = {result.unique_name for result in results}
all_tests = {test.unique_name for test in tests}
Expand Down

0 comments on commit 7030445

Please sign in to comment.