Skip to content

Commit 837e5ae

Browse files
committed
tools: print appropriate output when test aborted
distinguish test abort from all tests passed.
1 parent a7fde8a commit 837e5ae

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)