[PATCH 1 of 2] run-tests: report interrupted tests
Simon Heimberg
simohe at besonet.ch
Wed Jun 5 16:14:36 CDT 2013
# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1370462702 -7200
# Node ID 227d4459ac24fc8a5083bf62a182c78f756e3bd7
# Parent db081600a8eecfe66a907a3164020226c2a81a1a
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 -r db081600a8ee -r 227d4459ac24 tests/run-tests.py
--- a/tests/run-tests.py Mit Jun 05 21:16:49 2013 +0200
+++ b/tests/run-tests.py Mit Jun 05 22:05:02 2013 +0200
@@ -962,7 +962,11 @@
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:', testpath)
+ raise
if options.time:
endtime = time.time()
times.append((test, endtime - starttime))
More information about the Mercurial-devel
mailing list