summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-08-08 20:37:26 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-08-08 20:37:26 (GMT)
commit29650116685af6c78d85615cafbe2625e8c01af5 (patch)
tree322fda32e87728b7702cbbc5d89758cc4b645bce /Lib
parentbded28c081fe405a382fbb6b246a55a0697cea45 (diff)
downloadcpython-29650116685af6c78d85615cafbe2625e8c01af5.zip
cpython-29650116685af6c78d85615cafbe2625e8c01af5.tar.gz
cpython-29650116685af6c78d85615cafbe2625e8c01af5.tar.bz2
regrtest: give more information when a child process fails with an error
different than KeyboardInterrupt
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/test/regrtest.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 15d7d0b..c9ef0ff 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -440,8 +440,11 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
args, kwargs = json.loads(a)
try:
result = runtest(*args, **kwargs)
+ except KeyboardInterrupt:
+ result = INTERRUPTED, ''
except BaseException as e:
- result = INTERRUPTED, e.__class__.__name__
+ traceback.print_exc()
+ result = CHILD_ERROR, str(e)
sys.stdout.flush()
print() # Force a newline (just in case)
print(json.dumps(result))
@@ -684,8 +687,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
sys.stdout.flush()
sys.stderr.flush()
if result[0] == INTERRUPTED:
- assert result[1] == 'KeyboardInterrupt'
- raise KeyboardInterrupt # What else?
+ raise KeyboardInterrupt
if result[0] == CHILD_ERROR:
raise Exception("Child error on {}: {}".format(test, result[1]))
test_index += 1