mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02: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:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user