# HG changeset patch # User Simon Heimberg # Date 2013-06-05 20:05:02 # Node ID d7d40600a248da05a9598d92b764a916a0687750 # Parent cdc612db2ffba845d00885c9759f0c2d81f46397 run-tests: report interrupted tests When the test run is aborted, a message is printed for each interrupted test. This is helpful when a test is hanging. example failure message: INTERRUPTED: /path/to/tests/test-example.t The message can appear before or after the line with the number of tests diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -962,7 +962,11 @@ def runone(options, test, count): if options.time: starttime = time.time() - ret, out = runner(testpath, testtmp, options, replacements, env) + try: + ret, out = runner(testpath, testtmp, options, replacements, env) + except KeyboardInterrupt: + log('INTERRUPTED:', test) + raise if options.time: endtime = time.time() times.append((test, endtime - starttime))