diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py index 202ebb821ae1..ce724d1f3087 100644 --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -246,6 +246,11 @@ class MochitestOptions(optparse.OptionParser): help = "Filename of the output file where we can store a .json list of failures to be run in the future with --run-only-tests.") defaults["failureFile"] = None + self.add_option("--run-slower", + action = "store_true", dest = "runSlower", + help = "Delay execution between test files.") + defaults["runSlower"] = False + # -h, --help are automatically handled by OptionParser self.set_defaults(**defaults) @@ -639,6 +644,8 @@ class Mochitest(object): self.urlOpts.append("runOnly=false") if options.failureFile: self.urlOpts.append("failureFile=%s" % self.getFullPath(options.failureFile)) + if options.runSlower: + self.urlOpts.append("runSlower=true") def cleanup(self, manifest, options): """ remove temporary files and profile """ diff --git a/testing/mochitest/runtestsremote.py b/testing/mochitest/runtestsremote.py index 5ee7ec46ab53..272eaaca2904 100644 --- a/testing/mochitest/runtestsremote.py +++ b/testing/mochitest/runtestsremote.py @@ -302,6 +302,7 @@ class MochiRemote(Mochitest): self.localLog = options.logFile options.logFile = self.remoteLog options.profilePath = self.localProfile + env["MOZ_HIDE_RESULTS_TABLE"] = 1 retVal = Mochitest.buildURLOptions(self, options, env) #we really need testConfig.js (for browser chrome) try: diff --git a/testing/mochitest/tests/SimpleTest/TestRunner.js b/testing/mochitest/tests/SimpleTest/TestRunner.js index 857747c195db..fe1e980ede44 100644 --- a/testing/mochitest/tests/SimpleTest/TestRunner.js +++ b/testing/mochitest/tests/SimpleTest/TestRunner.js @@ -78,6 +78,7 @@ TestRunner._urls = []; TestRunner.timeout = 5 * 60 * 1000; // 5 minutes. TestRunner.maxTimeouts = 4; // halt testing after too many timeouts +TestRunner.runSlower = false; TestRunner._expectingProcessCrash = false; @@ -440,7 +441,11 @@ TestRunner.testFinished = function(tests) { TestRunner.updateUI(tests); TestRunner._currentTest++; - TestRunner.runNextTest(); + if (TestRunner.runSlower) { + setTimeout(TestRunner.runNextTest, 1000); + } else { + TestRunner.runNextTest(); + } } SpecialPowers.executeAfterFlushingMessageQueue(function() { diff --git a/testing/mochitest/tests/SimpleTest/setup.js b/testing/mochitest/tests/SimpleTest/setup.js index 95fb3460df23..d364d6c6d79f 100644 --- a/testing/mochitest/tests/SimpleTest/setup.js +++ b/testing/mochitest/tests/SimpleTest/setup.js @@ -104,6 +104,12 @@ if (!params.quiet) { TestRunner.logger.addListener("dumpListener", consoleLevel + "", dumpListener); } +// A temporary hack for android 4.0 where Fennec utilizes the pandaboard so much it reboots +if (params.runSlower) { + TestRunner.runSlower = true; +} + + var gTestList = []; var RunSet = {} RunSet.runall = function(e) {