summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Campailla <alexis@janeasystems.com>2015-07-07 22:48:26 +0200
committerAlexis Campailla <alexis@janeasystems.com>2015-07-16 20:21:30 -0400
commite7010bdf92a8aa8a41e893e713679c959d9be928 (patch)
tree94293308d592cd3d51b17c85da3f88a1925a9d13
parentffa1e1f31d9227096e2ec2aa97ce9321acff14b0 (diff)
downloadnode-e7010bdf92a8aa8a41e893e713679c959d9be928.tar.gz
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. PR-URL: https://github.com/joyent/node/pull/25686 Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
-rwxr-xr-xtools/test.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/test.py b/tools/test.py
index 1f81da655..f87c45367 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -68,7 +68,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.terminate = False
self.lock = threading.Lock()
@@ -129,9 +131,14 @@ class ProgressIndicator(object):
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