Skip to content

Commit

Permalink
Bug 1057328 - get gmp path for app-override tests, r=ted
Browse files Browse the repository at this point in the history
--HG--
extra : rebase_source : 19485859be5c0660d36242e2920fa3d4ca662666
  • Loading branch information
gijsk committed Aug 22, 2014
1 parent 489e95c commit 860badb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
14 changes: 10 additions & 4 deletions testing/mochitest/mach_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,16 @@ def run_desktop_test(self, context, suite=None, test_paths=None, debugger=None,
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)
Expand Down
6 changes: 6 additions & 0 deletions testing/mochitest/mochitest_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 3 additions & 0 deletions testing/mochitest/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,9 @@ def buildProfile(self, options):
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):
Expand Down

0 comments on commit 860badb

Please sign in to comment.