From 88cded2341c226348c8cd7881bbd212d4627c566 Mon Sep 17 00:00:00 2001 From: MoonlightSentinel Date: Thu, 25 Mar 2021 13:15:17 +0100 Subject: [PATCH] DEBUG: Rerun tests aborted by signal with gdb --- test/tools/d_do_test.d | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/tools/d_do_test.d b/test/tools/d_do_test.d index 9c76d819ebea..a6bcd5992895 100755 --- a/test/tools/d_do_test.d +++ b/test/tools/d_do_test.d @@ -1608,8 +1608,10 @@ int tryMain(string[] args) } // automatically rerun a segfaulting test and print its stack trace - version(linux) - if (e.msg.canFind("exited with rc == 139")) + version(Windows) {} + else version (OSX) {} + else + if (e.msg.canFind("exited with rc == 139") || e.msg.canFind("caught signal")) { auto gdbCommand = "gdb -q -n -ex 'set backtrace limit 100' -ex run -ex bt -batch -args " ~ command; runGDBTestWithLock(envData, () => spawnShell(gdbCommand).wait);