mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
bpo-34582: Adds JUnit XML output for regression tests (GH-9210)
This commit is contained in:
parent
cb5778f00c
commit
d0f49d2f50
12 changed files with 329 additions and 33 deletions
|
|
@ -67,7 +67,7 @@ def run_tests_worker(worker_args):
|
|||
try:
|
||||
result = runtest(ns, testname)
|
||||
except KeyboardInterrupt:
|
||||
result = INTERRUPTED, ''
|
||||
result = INTERRUPTED, '', None
|
||||
except BaseException as e:
|
||||
traceback.print_exc()
|
||||
result = CHILD_ERROR, str(e)
|
||||
|
|
@ -122,7 +122,7 @@ class MultiprocessThread(threading.Thread):
|
|||
self.current_test = None
|
||||
|
||||
if retcode != 0:
|
||||
result = (CHILD_ERROR, "Exit code %s" % retcode)
|
||||
result = (CHILD_ERROR, "Exit code %s" % retcode, None)
|
||||
self.output.put((test, stdout.rstrip(), stderr.rstrip(),
|
||||
result))
|
||||
return False
|
||||
|
|
@ -133,6 +133,7 @@ class MultiprocessThread(threading.Thread):
|
|||
return True
|
||||
|
||||
result = json.loads(result)
|
||||
assert len(result) == 3, f"Invalid result tuple: {result!r}"
|
||||
self.output.put((test, stdout.rstrip(), stderr.rstrip(),
|
||||
result))
|
||||
return False
|
||||
|
|
@ -195,7 +196,7 @@ def run_tests_multiprocess(regrtest):
|
|||
regrtest.accumulate_result(test, result)
|
||||
|
||||
# Display progress
|
||||
ok, test_time = result
|
||||
ok, test_time, xml_data = result
|
||||
text = format_test_result(test, ok)
|
||||
if (ok not in (CHILD_ERROR, INTERRUPTED)
|
||||
and test_time >= PROGRESS_MIN_TIME
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue