mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
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. Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR-URL: https://github.com/joyent/node/pull/25653
This commit is contained in:
1 parent
2d2494cf14
commit
a9b642cf5b
1 file changed
+10
-3
+10
-3
@@ -68,7 +68,9 @@ class ProgressIndicator(object):
|
|||||||
self.remaining = len(cases)
|
self.remaining = len(cases)
|
||||||
self.total = len(cases)
|
self.total = len(cases)
|
||||||
self.failed = [ ]
|
self.failed = [ ]
|
||||||
|
self.flaky_failed = [ ]
|
||||||
self.crashed = 0
|
self.crashed = 0
|
||||||
|
self.flaky_crashed = 0
|
||||||
self.terminate = False
|
self.terminate = False
|
||||||
self.lock = threading.Lock()
|
self.lock = threading.Lock()
|
||||||
|
|
||||||
@@ -129,9 +131,14 @@ class ProgressIndicator(object):
|
|||||||
return
|
return
|
||||||
self.lock.acquire()
|
self.lock.acquire()
|
||||||
if output.UnexpectedOutput():
|
if output.UnexpectedOutput():
|
||||||
self.failed.append(output)
|
if FLAKY in output.test.outcomes and self.flaky_tests_mode == "dontcare":
|
||||||
if output.HasCrashed():
|
self.flaky_failed.append(output)
|
||||||
self.crashed += 1
|
if output.HasCrashed():
|
||||||
|
self.flaky_crashed += 1
|
||||||
|
else:
|
||||||
|
self.failed.append(output)
|
||||||
|
if output.HasCrashed():
|
||||||
|
self.crashed += 1
|
||||||
else:
|
else:
|
||||||
self.succeeded += 1
|
self.succeeded += 1
|
||||||
self.remaining -= 1
|
self.remaining -= 1
|
||||||
|
|||||||
Reference in new issue
Block a user