diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2016-11-28 23:43:05 -0800 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2016-11-29 22:04:36 -0800 |
commit | 6d22836cb4e95c6608ca19af03998ad3582df4b9 (patch) | |
tree | 95a188590a066b12e4a426407ffee9f32e5b9ee9 /test/gjs-tests.cpp | |
parent | bdefe55e7c8b20b0d1fc9c0913b3ac3e64fe79fd (diff) | |
download | gjs-6d22836cb4e95c6608ca19af03998ad3582df4b9.tar.gz |
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 <hp@pobox.com>.
https://bugzilla.gnome.org/show_bug.cgi?id=605972
Diffstat (limited to 'test/gjs-tests.cpp')
-rw-r--r-- | test/gjs-tests.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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); |