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 gi.repository import GLib, Gio, FPrint
|
||||||
from output_checker import OutputChecker
|
from output_checker import OutputChecker
|
||||||
import cairo
|
import cairo
|
||||||
|
import signal
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from subprocess import DEVNULL
|
from subprocess import DEVNULL
|
||||||
@ -164,6 +165,11 @@ class FPrintdTest(dbusmock.DBusTestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
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()
|
super().setUpClass()
|
||||||
fprintd = None
|
fprintd = None
|
||||||
cls._polkitd = None
|
cls._polkitd = None
|
||||||
|
|||||||
Reference in New Issue
Block a user