mirror of
https://gitlab.freedesktop.org/libfprint/fprintd.git
synced 2026-01-19 07:00:27 +01:00
tests: Try to show backtrace when killed by SIGTERM
This means that we may manage to show a backtrace if meson kills the test process due to a timeout.
This commit is contained in:
parent
2bf6d6a266
commit
3c8ac241b8
1 changed files with 6 additions and 0 deletions
|
|
@ -38,6 +38,7 @@ gi.require_version('FPrint', '2.0')
|
|||
from gi.repository import GLib, Gio, FPrint
|
||||
from output_checker import OutputChecker
|
||||
import cairo
|
||||
import signal
|
||||
|
||||
try:
|
||||
from subprocess import DEVNULL
|
||||
|
|
@ -164,6 +165,11 @@ class FPrintdTest(dbusmock.DBusTestCase):
|
|||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
# Try to generate backtrace if meson kills as with SIGTERM
|
||||
def r(*args):
|
||||
raise KeyboardInterrupt()
|
||||
signal.signal(signal.SIGTERM, r)
|
||||
|
||||
super().setUpClass()
|
||||
fprintd = None
|
||||
cls._polkitd = None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue