Skip to content

Commit 2d87cff

Browse files
committed
runtest: when EC is killed, display an error message
1 parent 945c4e0 commit 2d87cff

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

scripts/testing/runtest

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,6 @@ MARKS = {
531531
('✓', CurseWrapper.COLOR_GREEN),
532532
-signal.SIGINT:
533533
('ϟ', CurseWrapper.COLOR_YELLOW),
534-
-signal.SIGTERM:
535-
('ϟ', CurseWrapper.COLOR_YELLOW),
536534
None:
537535
('✗', CurseWrapper.COLOR_RED),
538536
}
@@ -705,7 +703,20 @@ async def _run_all(options, allscripts, listener : Listener):
705703
status = await asyncio.wait_for(proc.wait(), 2.0)
706704

707705
except asyncio.TimeoutError:
708-
proc.kill(); status = await proc.wait()
706+
listener.error(
707+
handle, 'critical',
708+
'Timeout in wait() -- killing process'
709+
)
710+
proc.kill()
711+
status = await proc.wait()
712+
713+
if status < 0:
714+
procsig = -status
715+
if procsig != signal.SIGINT:
716+
listener.error(
717+
handle, 'critical',
718+
f'Killed (signal = {signal.Signals(procsig).name})'
719+
)
709720

710721
success = (bool(status) != bool(config.isvalid))
711722

0 commit comments

Comments
 (0)