fix(ci): enforce critical test watchdog
This commit is contained in:
+12
-14
@@ -114,22 +114,20 @@ jobs:
|
||||
print('$ ' + ' '.join(cmd), flush=True)
|
||||
process = subprocess.Popen(
|
||||
cmd,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
text=True,
|
||||
start_new_session=use_process_group,
|
||||
)
|
||||
try:
|
||||
output, _ = process.communicate(timeout=120)
|
||||
except subprocess.TimeoutExpired:
|
||||
print(f'ERROR: timeout ejecutando test critico {path}', file=sys.stderr, flush=True)
|
||||
kill_process_group(process.pid)
|
||||
cleanup_flutter_processes()
|
||||
return 124
|
||||
if output:
|
||||
print(output, end='', flush=True)
|
||||
cleanup_flutter_processes()
|
||||
return process.returncode
|
||||
deadline = time.monotonic() + 120
|
||||
while True:
|
||||
returncode = process.poll()
|
||||
if returncode is not None:
|
||||
cleanup_flutter_processes()
|
||||
return returncode
|
||||
if time.monotonic() >= deadline:
|
||||
print(f'ERROR: timeout ejecutando test critico {path}', file=sys.stderr, flush=True)
|
||||
kill_process_group(process.pid)
|
||||
cleanup_flutter_processes()
|
||||
return 124
|
||||
time.sleep(1)
|
||||
|
||||
cleanup_flutter_processes()
|
||||
for path in test_paths:
|
||||
|
||||
Reference in New Issue
Block a user