Skip to content

Commit 59b1608

Browse files
committed
Move annotations before test output
1 parent ba449b4 commit 59b1608

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎Lib/test/libregrtest/result.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ def escape(text: str) -> str:
191191
def escape_property(text: str) -> str:
192192
return escape(text).replace(":", "%3A").replace(",", "%2C")
193193

194-
annotations = [(f"{self.test_name}: {name}", traceback)
195-
for name, traceback in (self.errors or [])
196-
+ (self.failures or [])]
194+
annotations = (self.errors or []) + (self.failures or [])
197195
if not annotations:
198196
# No test case details: crash, timeout, env changed, etc.
199197
message = "\n".join([str(self), *(self.env_changed_reasons or ())])

‎Lib/test/libregrtest/run_workers.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,9 @@ def _process_result(self, item: QueueOutput) -> TestResult:
613613
result = mp_result.result
614614
self.results.accumulate_result(result, self.runtests)
615615
self.display_result(mp_result)
616+
if self.runtests.rerun and result.is_failed(self.runtests.fail_env_changed):
617+
# Annotate before the test output
618+
result.print_github_annotations()
616619

617620
# Display worker stdout
618621
if not self.runtests.output_on_failure:
@@ -624,8 +627,6 @@ def _process_result(self, item: QueueOutput) -> TestResult:
624627
stdout = mp_result.worker_stdout
625628
if stdout:
626629
print(stdout, flush=True)
627-
if self.runtests.rerun and result.is_failed(self.runtests.fail_env_changed):
628-
result.print_github_annotations()
629630

630631
return result
631632

0 commit comments

Comments
 (0)