Skip to content

Commit 83d11f8

Browse files
hotpineappletargos
authored andcommitted
tools: print appropriate output when test aborted
distinguish test abort from all tests passed. PR-URL: #59794 Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 44c2465 commit 83d11f8

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

@@ -1843,11 +1843,12 @@ def should_keep(case):
18431843

18441844
if result['allPassed']:
18451845
print("\nAll tests passed.")
1846-
else:
1846+
elif result['failed']:
18471847
print("\nFailed tests:")
18481848
for failure in result['failed']:
18491849
print(EscapeCommand(failure.command))
1850-
1850+
else:
1851+
print("\nTest aborted.")
18511852
return exitcode
18521853

18531854

0 commit comments

Comments
 (0)