[gnome-settings-daemon/benzea/ci-fixes] tests: Try showing a backtrace when meson terminates the process



commit 5ca0f1ded5f4a61ea38b51d9a43c77527fd42e4d
Author: Benjamin Berg <bberg redhat com>
Date:   Tue Jul 20 12:42:55 2021 +0200

    tests: Try showing a backtrace when meson terminates the process

 tests/gsdtestcase.py | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/tests/gsdtestcase.py b/tests/gsdtestcase.py
index 9926b3b3..d4b0c1bf 100644
--- a/tests/gsdtestcase.py
+++ b/tests/gsdtestcase.py
@@ -13,6 +13,7 @@ import fcntl
 import shutil
 import sys
 from glob import glob
+import signal
 
 from output_checker import OutputChecker
 
@@ -102,6 +103,11 @@ class GSDTestCase(X11SessionTestCase):
 
         klass.settings_session = Gio.Settings(schema_id='org.gnome.desktop.session')
 
+        # Make sure we get a backtrace when meson kills after a timeout
+        def r(*args):
+            raise KeyboardInterrupt()
+        signal.signal(signal.SIGTERM, r)
+
     def run(self, result=None):
         '''Show log files on failed tests
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]