commit 02bc032060b34f4ba150f3dc4a8bf1e2bab91640 Author: Sebastian Hahn sebastian@torproject.org Date: Sat Mar 21 04:00:05 2015 +0100
Print the stacktraces when running tests failed --- run_tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/run_tests.py b/run_tests.py index ce732f7..912a8d3 100755 --- a/run_tests.py +++ b/run_tests.py @@ -339,11 +339,13 @@ def _run_test(args, test_class, output_filters, logging_buffer):
try: suite = unittest.TestLoader().loadTestsFromName(test_class) - except AttributeError: + except AttributeError, e: # should only come up if user provided '--test' for something that doesn't exist + println(e, ERROR) println(" no such test", ERROR) return None - except: + except Exception, e: + println(e, ERROR) println(" failed", ERROR) return None