From 6d22836cb4e95c6608ca19af03998ad3582df4b9 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Mon, 28 Nov 2016 23:43:05 -0800 Subject: tests: Allow disabling abort timeout Run tests under GDB with GJS_TEST_SKIP_TIMEOUT=1 so that you don't get SIGABRT while stepping through the program. Original idea by Havoc Pennington . https://bugzilla.gnome.org/show_bug.cgi?id=605972 --- test/gjs-tests.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/gjs-tests.cpp') diff --git a/test/gjs-tests.cpp b/test/gjs-tests.cpp index 17251b36..47559b1c 100644 --- a/test/gjs-tests.cpp +++ b/test/gjs-tests.cpp @@ -215,7 +215,10 @@ int main(int argc, char **argv) { - gjs_crash_after_timeout(60*7); /* give the unit tests 7 minutes to complete */ + /* give the unit tests 7 minutes to complete, unless an environment variable + * is set; use this when running under GDB, for example */ + if (!g_getenv("GJS_TEST_SKIP_TIMEOUT")) + gjs_crash_after_timeout(60 * 7); g_test_init(&argc, &argv, NULL); -- cgit v1.2.1