diff --git a/build/automation.py.in b/build/automation.py.in index 405a6a3559cd..c36771a13fab 100644 --- a/build/automation.py.in +++ b/build/automation.py.in @@ -61,6 +61,7 @@ __all__ = [ "UNIXISH", "IS_WIN32", "IS_MAC", + "log", "runApp", "Process", "initializeProfile", diff --git a/testing/mochitest/runtests.py.in b/testing/mochitest/runtests.py.in index 2216bcd3c902..730293608e37 100644 --- a/testing/mochitest/runtests.py.in +++ b/testing/mochitest/runtests.py.in @@ -42,7 +42,6 @@ Runs the Mochitest test harness. """ from datetime import datetime -import logging import optparse import os import os.path @@ -83,8 +82,6 @@ PROFILE_DIRECTORY = os.path.abspath("./mochitesttestingprofile") LEAK_REPORT_FILE = PROFILE_DIRECTORY + "/" + "leaks-report.log" -log = logging.getLogger() - # Map of debugging programs to information about them, like default arguments # and whether or not they are interactive. DEBUGGER_INFO = { @@ -273,7 +270,7 @@ class MochitestServer: env["LD_LIBRARY_PATH"] = self._xrePath env["MOZILLA_FIVE_HOME"] = self._xrePath env["XPCOM_DEBUG_BREAK"] = "warn" - if automation.IS_MAC: + elif automation.IS_MAC: env["DYLD_LIBRARY_PATH"] = self._xrePath elif automation.IS_WIN32: env["PATH"] = env["PATH"] + ";" + self._xrePath @@ -290,7 +287,7 @@ class MochitestServer: if pid < 0: print "Error starting server." sys.exit(2) - log.info("Server pid: %d", pid) + automation.log.info("INFO | runtests.py | Server pid: %d", pid) def ensureReady(self, timeout): @@ -448,6 +445,11 @@ Are you executing $objdir/_tests/testing/mochitest/runtests.py?""" testURL = A11YTESTS_URL if options.testPath: urlOpts.append("testPath=" + encodeURIComponent(options.testPath)) + # Force leak threshold. (bug 472773) + if automation.IS_MAC and options.leakThreshold == 0: + options.leakThreshold = 68 + automation.log.info("INFO | runtests.py | setting leak threshold to %d", + options.leakThreshold) elif options.browserChrome: testURL = "about:blank"