[PATCH] run-tests: report tests as failed when run-test raises an error

Simon Heimberg simohe at besonet.ch
Thu Jan 16 04:30:45 CST 2014


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1389868135 -3600
# Node ID 076bb545349bb0ebc8e6ab6def2f4f4b0c905667
# Parent  34a816e97e692cc547dde29fa4d95dcd7e918b3d
run-tests: report tests as failed when run-test raises an error

Before no message was returned to the main thread. No result was registered
and no new thread was started.
This does not happen when running normal. But when fiddling around with
the test infrastructure, this helps a lot.

diff -r 34a816e97e69 -r 076bb545349b tests/run-tests.py
--- a/tests/run-tests.py	Don Jan 16 11:26:54 2014 +0100
+++ b/tests/run-tests.py	Don Jan 16 11:28:55 2014 +0100
@@ -1092,6 +1092,9 @@
             done.put(runone(options, test, count))
         except KeyboardInterrupt:
             pass
+        except: # re-raises
+            done.put('!', test, 'run-test raised an error, see traceback')
+            raise
 
     try:
         while tests or running:


More information about the Mercurial-devel mailing list