Skip to content

Commit

Permalink
runtest: when EC is killed, display an error message
Browse files Browse the repository at this point in the history
  • Loading branch information
strub committed May 25, 2024
1 parent 945c4e0 commit 2d87cff
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions scripts/testing/runtest
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,6 @@ MARKS = {
('✓', CurseWrapper.COLOR_GREEN),
-signal.SIGINT:
('ϟ', CurseWrapper.COLOR_YELLOW),
-signal.SIGTERM:
('ϟ', CurseWrapper.COLOR_YELLOW),
None:
('✗', CurseWrapper.COLOR_RED),
}
Expand Down Expand Up @@ -705,7 +703,20 @@ async def _run_all(options, allscripts, listener : Listener):
status = await asyncio.wait_for(proc.wait(), 2.0)

except asyncio.TimeoutError:
proc.kill(); status = await proc.wait()
listener.error(
handle, 'critical',
'Timeout in wait() -- killing process'
)
proc.kill()
status = await proc.wait()

if status < 0:
procsig = -status
if procsig != signal.SIGINT:
listener.error(
handle, 'critical',
f'Killed (signal = {signal.Signals(procsig).name})'
)

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

Expand Down

0 comments on commit 2d87cff

Please sign in to comment.