From 5fa9586ddcdcf2e5b385738089e18541de23f090 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 14 Oct 2017 22:12:04 +0100 Subject: Try to get automatic backtraces when unit tests crash. --- cscript | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cscript') diff --git a/cscript b/cscript index 519e0d806..28be96c75 100644 --- a/cscript +++ b/cscript @@ -452,9 +452,11 @@ def make_manual(target): def test(target, test): if target.platform != 'windows': target.set('LC_ALL', 'C') - cmd = 'run/tests ' - if target.debug: - cmd += '--backtrace ' + base = 'run/tests ' if test is not None: - cmd += '--run_test=%s' % test + base += '--run_test=%s' % test + if target.debug: + cmd = 'gdb -batch -ex "run" -ex "bt" "%s" 2>&1 | grep -v ^"No stack."' % base + else: + cmd = base target.command(cmd) -- cgit v1.2.3