Browse Source

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 a9b642cf5b

PR-URL: https://github.com/nodejs/node/pull/2424
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
v4.0.0-rc
Alexis Campailla 10 years ago
parent
commit
8c41b9a826
  1. 7
      tools/test.py

7
tools/test.py

@ -75,7 +75,9 @@ class ProgressIndicator(object):
self.remaining = len(cases)
self.total = len(cases)
self.failed = [ ]
self.flaky_failed = [ ]
self.crashed = 0
self.flaky_crashed = 0
self.lock = threading.Lock()
self.shutdown_event = threading.Event()
@ -143,6 +145,11 @@ class ProgressIndicator(object):
return
self.lock.acquire()
if output.UnexpectedOutput():
if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE:
self.flaky_failed.append(output)
if output.HasCrashed():
self.flaky_crashed += 1
else:
self.failed.append(output)
if output.HasCrashed():
self.crashed += 1

Loading…
Cancel
Save