diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-10-14 22:12:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-10-14 22:12:04 +0100 |
| commit | 5fa9586ddcdcf2e5b385738089e18541de23f090 (patch) | |
| tree | 6b503a9093bd2a9386714d7936418521432c5dc7 /cscript | |
| parent | 7b71586d8a082f9182a59cadeea53a5b77a2afa3 (diff) | |
Try to get automatic backtraces when unit tests crash.
Diffstat (limited to 'cscript')
| -rw-r--r-- | cscript | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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) |
