# HG changeset patch # User Simon Heimberg # Date 1370462729 -7200 # Node ID 663143c0a5e21bb2c1f36783f3505a045dd90794 # Parent f412189fe8f808eae05a2e38d4daca4e606e9234 run-tests: when interrupted report time in failure message When --time is specified, the interruption message of an interrupted test is extended with the time the test has run INTERRUPTED: /path/to/tests/test-example.t (after 513 seconds) [ original upstream message ] diff -r f412189fe8f8 -r 663143c0a5e2 tests/run-tests.py --- a/tests/run-tests.py Wed Jun 05 22:05:02 2013 +0200 +++ b/tests/run-tests.py Wed Jun 05 22:05:29 2013 +0200 @@ -965,7 +965,11 @@ try: ret, out = runner(testpath, testtmp, options, replacements, env) except KeyboardInterrupt: - log('INTERRUPTED:', test) + msg = '' + if options.time: + endtime = time.time() + msg = '(after %d seconds)' % (endtime - starttime) + log('INTERRUPTED:', test, msg) raise if options.time: endtime = time.time()