Bug 1410165 - Make the test harness properly listen to crash events when running a test more than once; r?mconley draft
authorGabriele Svelto <gsvelto@mozilla.com>
Fri, 20 Oct 2017 15:21:46 +0200
changeset 684937 bae28d564d46ccc29c6bcd94c53902eba0e35794
parent 684511 ce1a86d3b4db161c95d1147676bbed839d7a4732
child 737004 ba7dbd4dbaa15fe62d6b2178d70b94f635b34a18
push id85771
push usergsvelto@mozilla.com
push dateMon, 23 Oct 2017 19:35:17 +0000
reviewersmconley
bugs1410165
milestone58.0a1
Bug 1410165 - Make the test harness properly listen to crash events when running a test more than once; r?mconley 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) {