[e2e_testing] check process exitcode early in e2e (#3591)

It will exit immediately. So it doesn't need to wait 6 min.
pull/3592/head
Yuanqiang Liu 2024-08-05 10:41:09 +08:00 committed by GitHub
parent 7e7af67080
commit 7030445c15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -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}