test.py: highlight the failure cause

Use color palette to highlight the exception which aborted
the harness.
This commit is contained in:
Konstantin Osipov
2022-01-14 20:31:30 +03:00
parent 56aaabfa31
commit dee6da53b3

View File

@@ -921,7 +921,11 @@ async def main():
setup_signal_handlers(asyncio.get_event_loop(), signaled)
await run_all_tests(signaled, options)
try:
await run_all_tests(signaled, options)
except Exception as e:
print(palette.fail(e))
raise
if signaled.is_set():
return -signaled.signo