Commit 3c4654da authored by Michael Achenbach's avatar Michael Achenbach Committed by V8 LUCI CQ

[test] Dump traceback on test-runner interrupts

Bug: v8:13113
Change-Id: I7cd37446d9ecbe271e0e5df96a4dcfd43b307c27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3879489Reviewed-by: 's avatarAlexander Schulze <alexschulze@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83056}
parent f1026c19
......@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import faulthandler
import logging
import signal
......@@ -20,11 +21,15 @@ class SignalProc(base.TestProcObserver):
logging.warning('Ctrl-C detected, early abort...')
self.exit_code = utils.EXIT_CODE_INTERRUPTED
self.stop()
if logging.getLogger().isEnabledFor(logging.INFO):
faulthandler.dump_traceback()
def _on_sigterm(self, _signum, _stack_frame):
logging.warning('SIGTERM received, early abort...')
self.exit_code = utils.EXIT_CODE_TERMINATED
self.stop()
if logging.getLogger().isEnabledFor(logging.INFO):
faulthandler.dump_traceback()
def worst_exit_code(self, results):
exit_code = results.exit_code()
......
......@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import faulthandler
import logging
import time
......@@ -34,3 +35,5 @@ class TimeoutProc(base.TestProcObserver):
if time.time() - self._start > self._duration_sec:
logging.info('Total timeout reached.')
self.stop()
if logging.getLogger().isEnabledFor(logging.INFO):
faulthandler.dump_traceback()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment