Commit 228da429 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-30258: Fix handling of child error in regrtest (#1477)

Don't stop the worker thread if a child failed.
parent 03b27889
......@@ -555,16 +555,16 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
# comes from the shutdown of the interpreter in the subcommand.
stderr = debug_output_pat.sub("", stderr)
if retcode != 0:
if retcode == 0:
stdout, _, result = stdout.strip().rpartition("\n")
if not result:
output.put((None, None, None, None))
return
result = json.loads(result)
else:
result = (CHILD_ERROR, "Exit code %s" % retcode)
output.put((test, stdout.rstrip(), stderr.rstrip(),
result))
stdout, _, result = stdout.strip().rpartition("\n")
if not result:
output.put((None, None, None, None))
return
result = json.loads(result)
output.put((test, stdout.rstrip(), stderr.rstrip(), result))
except BaseException:
output.put((None, None, None, None))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment