Try to allow debugging during test runs.
authorCarl Hetherington <cth@carlh.net>
Thu, 28 Jul 2016 12:20:16 +0000 (13:20 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 28 Jul 2016 12:20:16 +0000 (13:20 +0100)
cscript

diff --git a/cscript b/cscript
index 41cb339a16602d398dcb5fd7fb376afc0a0f3aac..c533dac25ac4c08a1dbc3146e1f8b1558a3ad8d2 100644 (file)
--- a/cscript
+++ b/cscript
@@ -381,7 +381,9 @@ def make_manual(target):
 def test(target, test):
     if target.platform != 'windows':
         target.set('LC_ALL', 'C')
-        if test is None:
-            target.command('run/tests')
-        else:
-            target.command('run/tests --run_test=%s' % test)
+        cmd = 'run/tests '
+        if target.debug:
+            cmd += '--backtrace '
+        if test is not None:
+            cmd += '--run_test=%s' % test
+        target.command(cmd)