Skip to content

Commit

Permalink
test: runner should return 0 on flaky tests
Browse files Browse the repository at this point in the history
Make the test runner return a 0 exit code when only
flaky tests fail and --flaky-tests=dontcare is specified.

PR-URL: nodejs/node-v0.x-archive#25686
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
  • Loading branch information
orangemocha committed Jul 17, 2015
1 parent ffa1e1f commit e7010bd
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def __init__(self, cases, flaky_tests_mode):
self.remaining = len(cases)
self.total = len(cases)
self.failed = [ ]
self.flaky_failed = [ ]
self.crashed = 0
self.flaky_crashed = 0
self.terminate = False
self.lock = threading.Lock()

Expand Down Expand Up @@ -129,9 +131,14 @@ def RunSingle(self):
return
self.lock.acquire()
if output.UnexpectedOutput():
self.failed.append(output)
if output.HasCrashed():
self.crashed += 1
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
else:
self.succeeded += 1
self.remaining -= 1
Expand Down

0 comments on commit e7010bd

Please sign in to comment.