mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 938289 - part 2 - add mochitest support for specifying DMD paths; r=jmaher
This commit is contained in:
parent
0f8ca584d8
commit
6801f5793c
@ -351,6 +351,12 @@ class MochitestOptions(optparse.OptionParser):
|
||||
"dest": "e10s",
|
||||
"help": "Run tests with electrolysis preferences and test filtering enabled.",
|
||||
}],
|
||||
[["--dmd-path"],
|
||||
{ "action": "store",
|
||||
"default": None,
|
||||
"dest": "dmdPath",
|
||||
"help": "Specifies the path to the directory containing the shared library for DMD.",
|
||||
}],
|
||||
]
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
@ -392,6 +398,8 @@ class MochitestOptions(optparse.OptionParser):
|
||||
options.xrePath = mochitest.getFullPath(options.xrePath)
|
||||
options.profilePath = mochitest.getFullPath(options.profilePath)
|
||||
options.app = mochitest.getFullPath(options.app)
|
||||
if options.dmdPath is not None:
|
||||
options.dmdPath = mochitest.getFullPath(options.dmdPath)
|
||||
|
||||
if not os.path.exists(options.app):
|
||||
msg = """\
|
||||
|
@ -621,7 +621,8 @@ class Mochitest(MochitestUtilsMixin):
|
||||
|
||||
def buildBrowserEnv(self, options, debugger=False):
|
||||
"""build the environment variables for the specific test and operating system"""
|
||||
browserEnv = self.environment(xrePath=options.xrePath, debugger=debugger)
|
||||
browserEnv = self.environment(xrePath=options.xrePath, debugger=debugger,
|
||||
dmdPath=options.dmdPath)
|
||||
|
||||
# These variables are necessary for correct application startup; change
|
||||
# via the commandline at your own risk.
|
||||
|
@ -580,6 +580,14 @@ def main():
|
||||
log.info("Android sdk version '%s'; will use this to filter manifests" % str(androidVersion))
|
||||
mozinfo.info['android_version'] = androidVersion
|
||||
|
||||
deviceRoot = dm.getDeviceRoot()
|
||||
if options.dmdPath:
|
||||
dmdLibrary = "libdmd.so"
|
||||
dmdPathOnDevice = os.path.join(deviceRoot, dmdLibrary)
|
||||
dm.removeFile(dmdPathOnDevice)
|
||||
dm.pushFile(os.path.join(options.dmdPath, dmdLibrary), dmdPathOnDevice)
|
||||
options.dmdPath = deviceRoot
|
||||
|
||||
procName = options.app.split('/')[-1]
|
||||
if (dm.processExist(procName)):
|
||||
dm.killProcess(procName)
|
||||
@ -605,7 +613,6 @@ def main():
|
||||
my_tests = tests[start:end]
|
||||
log.info("Running tests %d-%d/%d", start+1, end, len(tests))
|
||||
|
||||
deviceRoot = dm.getDeviceRoot()
|
||||
dm.removeFile(os.path.join(deviceRoot, "fennec_ids.txt"))
|
||||
fennec_ids = os.path.abspath("fennec_ids.txt")
|
||||
if not os.path.exists(fennec_ids) and options.robocopIds:
|
||||
|
Loading…
Reference in New Issue
Block a user