Bug 1394910 - Return failed status from mochitest harness when one or more tests fail; r=jmaher
authorGeoff Brown <gbrown@mozilla.com>
Wed, 13 Sep 2017 08:27:18 -0600
changeset 430192 20ed0d0bd4b8412acf613ed586f7b17fa24ece2d
parent 430191 197a9e821ce8a565b1ec104b77a28b0de30b90fa
child 430193 a011200d3c85de865781a68aac3fd5ab47d2bfd4
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1394910
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1394910 - Return failed status from mochitest harness when one or more tests fail; r=jmaher
testing/mochitest/runtests.py
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -2469,16 +2469,17 @@ toolbar#nav-bar {
         else:
             print("0 INFO TEST-START | Shutdown")
             print("1 INFO Passed:  %s" % self.countpass)
             print("2 INFO Failed:  %s" % self.countfail)
             print("3 INFO Todo:    %s" % self.counttodo)
             print("4 INFO Mode:    %s" % e10s_mode)
             print("5 INFO SimpleTest FINISHED")
 
+        result = result or (-2 if self.countfail > 0 else 0)
         return result
 
     def doTests(self, options, testsToFilter=None):
         # A call to initializeLooping method is required in case of --run-by-dir or --bisect-chunk
         # since we need to initialize variables for each loop.
         if options.bisectChunk or options.runByManifest:
             self.initializeLooping(options)