Skip to content

Commit 4b19439

Browse files
hotpineapplerichardlau
authored andcommitted
tools: print appropriate output when test aborted
distinguish test abort from all tests passed. PR-URL: #59794 Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent cf5d91e commit 4b19439

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def Run(self, tasks) -> Dict:
174174
raise
175175
self.Done()
176176
return {
177-
'allPassed': not self.failed,
177+
'allPassed': not self.failed and not self.shutdown_event.is_set(),
178178
'failed': self.failed,
179179
}
180180

@@ -1834,11 +1834,12 @@ def should_keep(case):
18341834

18351835
if result['allPassed']:
18361836
print("\nAll tests passed.")
1837-
else:
1837+
elif result['failed']:
18381838
print("\nFailed tests:")
18391839
for failure in result['failed']:
18401840
print(EscapeCommand(failure.command))
1841-
1841+
else:
1842+
print("\nTest aborted.")
18421843
return exitcode
18431844

18441845

0 commit comments

Comments
 (0)