Bug 1410165 - Make the test harness properly listen to crash events when running a test more than once. r=mconley, a=test-only
authorGabriele Svelto <gsvelto@mozilla.com>
Fri, 20 Oct 2017 15:21:46 +0200
changeset 432745 036b6ffa94c9852463c0726ce70ac79a6f65427e
parent 432744 4005ce92f03ea6c8dc2a7a0e60756c43ce66427f
child 432746 119fd95b6e842a6cba502cf849fddfe558ee38bc
push id8050
push userryanvm@gmail.com
push dateWed, 25 Oct 2017 18:39:16 +0000
treeherdermozilla-beta@921ae95a11f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, test-only
bugs1410165
milestone57.0
Bug 1410165 - Make the test harness properly listen to crash events when running a test more than once. r=mconley, a=test-only MozReview-Commit-ID: C3PDtOfaz0v
testing/mochitest/tests/SimpleTest/TestRunner.js
--- a/testing/mochitest/tests/SimpleTest/TestRunner.js
+++ b/testing/mochitest/tests/SimpleTest/TestRunner.js
@@ -453,29 +453,29 @@ TestRunner.runNextTest = function() {
             // ... the count,
             $("fail-count").innerHTML = 1;
             // ... the indicator.
             var indicator = $("indicator");
             indicator.innerHTML = "Status: Fail (No checks actually run)";
             indicator.style.backgroundColor = "red";
         }
 
-        SpecialPowers.unregisterProcessCrashObservers();
-
         let e10sMode = SpecialPowers.isMainProcess() ? "non-e10s" : "e10s";
 
         TestRunner.structuredLogger.info("TEST-START | Shutdown");
         TestRunner.structuredLogger.info("Passed:  " + passCount);
         TestRunner.structuredLogger.info("Failed:  " + failCount);
         TestRunner.structuredLogger.info("Todo:    " + todoCount);
         TestRunner.structuredLogger.info("Mode:    " + e10sMode);
         TestRunner.structuredLogger.info("Slowest: " + TestRunner.slowestTestTime + 'ms - ' + TestRunner.slowestTestURL);
 
-        // If we are looping, don't send this cause it closes the log file
+        // If we are looping, don't send this cause it closes the log file,
+        // also don't unregister the crash observers until we're done.
         if (TestRunner.repeat === 0) {
+          SpecialPowers.unregisterProcessCrashObservers();
           TestRunner.structuredLogger.info("SimpleTest FINISHED");
         }
 
         if (TestRunner.repeat === 0 && TestRunner.onComplete) {
              TestRunner.onComplete();
          }
 
         if (TestRunner._currentLoop <= TestRunner.repeat && !TestRunner._haltTests) {