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