[Xfce4-commits] <midori:master> Print backtraces of failing unit tests
Christian Dywan
noreply at xfce.org
Fri Nov 16 20:08:01 CET 2012
Updating branch refs/heads/master
to 1ccc87269bff076975151bd30453467ae7dbe26a (commit)
from 20a237a9bbcb91e3cf54b494dfe7c937d92aa085 (commit)
commit 1ccc87269bff076975151bd30453467ae7dbe26a
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Nov 16 18:09:15 2012 +0100
Print backtraces of failing unit tests
wscript | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/wscript b/wscript
index 0bb29f0..cff69b7 100644
--- a/wscript
+++ b/wscript
@@ -558,7 +558,17 @@ def shutdown ():
test.want_to_see_test_output = True
test.want_to_see_test_error = True
test.run ()
- test.print_results ()
+
+ for label in test.unit_tests.allkeys:
+ if not test.unit_test_results[label]:
+ Utils.pprint ('YELLOW', label + '...FAILED')
+ file_and_src = test.unit_tests[label]
+ try:
+ subprocess.Popen (['gdb', '--batch', '-ex', 'run', '-ex', 'bt', file_and_src[0]]).wait()
+ except:
+ Utils.pprint ('RED', 'Install gdb to see backtraces')
+ else:
+ Utils.pprint ('GREEN', label + '.......OK')
elif Options.options.update_po:
os.chdir('./po')
More information about the Xfce4-commits
mailing list