Bug 1181867 - move -runtime flag to runtests.py so it gets set in automation; r=jland,ahalberstadt

This commit is contained in:
Myk Melez 2015-07-20 09:38:49 -07:00
parent a28251ab50
commit d7d6ad9a46
2 changed files with 5 additions and 4 deletions

View File

@ -333,10 +333,6 @@ class MochitestRunner(MozbuildObject):
if not options.app or options.app == self.get_binary_path():
options.app = self.get_webapp_runtime_path()
options.xrePath = self.get_webapp_runtime_xre_path()
# On Mac, pass the path to the runtime, to ensure the test app
# uses that specific runtime instead of another one on the system.
if sys.platform.startswith('darwin'):
options.browserArgs.extend(('-runtime', os.path.join(self.distdir, self.substs['MOZ_MACBUNDLE_NAME'])))
from manifestparser import TestManifest
manifest = TestManifest()

View File

@ -2212,6 +2212,11 @@ class Mochitest(MochitestUtilsMixin):
if self.urlOpts:
testURL += "?" + "&".join(self.urlOpts)
# On Mac, pass the path to the runtime, to ensure the test app
# uses that specific runtime instead of another one on the system.
if mozinfo.isMac and options.webapprtChrome:
options.browserArgs.extend(('-runtime', os.path.dirname(os.path.dirname(options.xrePath))))
if options.webapprtContent:
options.browserArgs.extend(('-test-mode', testURL))
testURL = None