Bug 1057328 - get gmp path for app-override tests, r=ted

--HG--
extra : rebase_source : 19485859be5c0660d36242e2920fa3d4ca662666
This commit is contained in:
Gijs Kruitbosch 2014-08-22 16:28:04 +02:00
parent 3c67de244d
commit 7a6a4c6b03
3 changed files with 19 additions and 4 deletions

View File

@ -355,10 +355,16 @@ class MochitestRunner(MozbuildObject):
return 1
options.debuggerArgs = debugger_args
if app_override == "dist":
options.app = self.get_binary_path(where='staged-package')
elif app_override:
options.app = app_override
if app_override:
if app_override == "dist":
options.app = self.get_binary_path(where='staged-package')
elif app_override:
options.app = app_override
if options.gmp_path is None:
# Need to fix the location of gmp_fake which might not be shipped in the binary
bin_path = self.get_binary_path()
options.gmp_path = os.path.join(os.path.dirname(bin_path), 'gmp-fake')
logger_options = {key: value for key, value in vars(options).iteritems() if key.startswith('log')}
runner = mochitest.Mochitest(logger_options)

View File

@ -410,6 +410,12 @@ class MochitestOptions(optparse.OptionParser):
"dest": "useTestMediaDevices",
"help": "Use test media device drivers for media testing.",
}],
[["--gmp-path"],
{ "action": "store",
"default": None,
"dest": "gmp_path",
"help": "Path to fake GMP plugin. Will be deduced from the binary if not passed.",
}],
]
def __init__(self, **kwargs):

View File

@ -1162,6 +1162,9 @@ class Mochitest(MochitestUtilsMixin):
return manifest
def getGMPPluginPath(self, options):
if options.gmp_path:
return options.gmp_path
# For local builds, gmp-fake will be under dist/bin.
gmp_path = os.path.join(options.xrePath, 'gmp-fake')
if os.path.isdir(gmp_path):