Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8f8ab6f

Browse filesBrowse files
orangemocharvagg
authored andcommitted
test: runner should return 0 on flaky tests
Make the test runner return a 0 exit code when only flaky tests fail and --flaky-tests=dontcare is specified. Ported from nodejs/node-v0.x-archive@a9b642c PR-URL: #2424 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: João Reis <reis@janeasystems.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1 parent 0cfd3be commit 8f8ab6f
Copy full SHA for 8f8ab6f

File tree

Expand file treeCollapse file tree

1 file changed

+10
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-3
lines changed
Open diff view settings
Collapse file

‎tools/test.py‎

Copy file name to clipboardExpand all lines: tools/test.py
+10-3Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ def __init__(self, cases, flaky_tests_mode):
7575
self.remaining = len(cases)
7676
self.total = len(cases)
7777
self.failed = [ ]
78+
self.flaky_failed = [ ]
7879
self.crashed = 0
80+
self.flaky_crashed = 0
7981
self.lock = threading.Lock()
8082
self.shutdown_event = threading.Event()
8183

@@ -143,9 +145,14 @@ def RunSingle(self, parallel, thread_id):
143145
return
144146
self.lock.acquire()
145147
if output.UnexpectedOutput():
146-
self.failed.append(output)
147-
if output.HasCrashed():
148-
self.crashed += 1
148+
if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE:
149+
self.flaky_failed.append(output)
150+
if output.HasCrashed():
151+
self.flaky_crashed += 1
152+
else:
153+
self.failed.append(output)
154+
if output.HasCrashed():
155+
self.crashed += 1
149156
else:
150157
self.succeeded += 1
151158
self.remaining -= 1

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.