summaryrefslogtreecommitdiffstats
path: root/Lib/test/libregrtest/runtest_mp.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-05-09 09:34:01 (GMT)
committerGitHub <noreply@github.com>2017-05-09 09:34:01 (GMT)
commit74683fc6247c522ae955a6e7308b8ff51def35d8 (patch)
treeefc54a62e658f26c9fe66e257f4740923307096b /Lib/test/libregrtest/runtest_mp.py
parent9da408d15bdef624a5632182cb4edf98001fa82f (diff)
downloadcpython-74683fc6247c522ae955a6e7308b8ff51def35d8.zip
cpython-74683fc6247c522ae955a6e7308b8ff51def35d8.tar.gz
cpython-74683fc6247c522ae955a6e7308b8ff51def35d8.tar.bz2
bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479)
If the child process exited with a non-zero code, don't strip the last line of stdout anymore. Add also a sanity check in accumulate_result().
Diffstat (limited to 'Lib/test/libregrtest/runtest_mp.py')
-rw-r--r--Lib/test/libregrtest/runtest_mp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/libregrtest/runtest_mp.py b/Lib/test/libregrtest/runtest_mp.py
index 34b3ae6..779ff01 100644
--- a/Lib/test/libregrtest/runtest_mp.py
+++ b/Lib/test/libregrtest/runtest_mp.py
@@ -124,13 +124,13 @@ class MultiprocessThread(threading.Thread):
finally:
self.current_test = None
- stdout, _, result = stdout.strip().rpartition("\n")
if retcode != 0:
result = (CHILD_ERROR, "Exit code %s" % retcode)
self.output.put((test, stdout.rstrip(), stderr.rstrip(),
result))
return False
+ stdout, _, result = stdout.strip().rpartition("\n")
if not result:
self.output.put((None, None, None, None))
return True