mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 808729 - Set _TESTING_MODULES_DIR for Android xpcshell tests; r=jmaher
--HG-- extra : rebase_source : 80896416e1262802421282573af6c2babc4cfcac
This commit is contained in:
parent
b5844a01a0
commit
8da8b19c60
@ -62,6 +62,7 @@ xpcshell-tests-remote:
|
||||
$(topsrcdir)/testing/xpcshell/remotexpcshelltests.py \
|
||||
--symbols-path=$(DIST)/crashreporter-symbols \
|
||||
--build-info-json=$(DEPTH)/mozinfo.json \
|
||||
--testing-modules-dir=$(DEPTH)/_tests/modules \
|
||||
$(EXTRA_TEST_ARGS) \
|
||||
--dm_trans=$(DM_TRANS) \
|
||||
--deviceIP=${TEST_DEVICE} \
|
||||
@ -112,6 +113,7 @@ check-one-remote:
|
||||
--symbols-path=$(DIST)/crashreporter-symbols \
|
||||
--build-info-json=$(DEPTH)/mozinfo.json \
|
||||
--test-path=$(SOLO_FILE) \
|
||||
--testing-modules-dir=$(DEPTH)/_tests/modules \
|
||||
--profile-name=$(MOZ_APP_NAME) \
|
||||
--verbose \
|
||||
$(EXTRA_TEST_ARGS) \
|
||||
|
@ -62,6 +62,7 @@ xpcshell-tests-remote:
|
||||
$(topsrcdir)/testing/xpcshell/remotexpcshelltests.py \
|
||||
--symbols-path=$(DIST)/crashreporter-symbols \
|
||||
--build-info-json=$(DEPTH)/mozinfo.json \
|
||||
--testing-modules-dir=$(DEPTH)/_tests/modules \
|
||||
$(EXTRA_TEST_ARGS) \
|
||||
--dm_trans=$(DM_TRANS) \
|
||||
--deviceIP=${TEST_DEVICE} \
|
||||
@ -112,6 +113,7 @@ check-one-remote:
|
||||
--symbols-path=$(DIST)/crashreporter-symbols \
|
||||
--build-info-json=$(DEPTH)/mozinfo.json \
|
||||
--test-path=$(SOLO_FILE) \
|
||||
--testing-modules-dir=$(DEPTH)/_tests/modules \
|
||||
--profile-name=$(MOZ_APP_NAME) \
|
||||
--verbose \
|
||||
$(EXTRA_TEST_ARGS) \
|
||||
|
@ -48,6 +48,7 @@ RUN_MOCHITEST_REMOTE = \
|
||||
$(PYTHON) _tests/testing/mochitest/runtestsremote.py --autorun --close-when-done \
|
||||
--console-level=INFO --log-file=./$@.log --file-level=INFO $(DM_FLAGS) --dm_trans=$(DM_TRANS) \
|
||||
--app=$(TEST_PACKAGE_NAME) --deviceIP=${TEST_DEVICE} --xre-path=${MOZ_HOST_BIN} \
|
||||
--testing-modules-dir=$(call core_abspath,_tests/modules) \
|
||||
$(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
|
||||
|
||||
RUN_MOCHITEST_ROBOTIUM = \
|
||||
@ -269,6 +270,7 @@ REMOTE_XPCSHELL = \
|
||||
--manifest=$(DEPTH)/_tests/xpcshell/xpcshell.ini \
|
||||
--build-info-json=$(DEPTH)/mozinfo.json \
|
||||
--no-logfiles \
|
||||
--testing-modules-dir=$(call core_abspath,_tests/modules) \
|
||||
--dm_trans=$(DM_TRANS) \
|
||||
--deviceIP=${TEST_DEVICE} \
|
||||
--objdir=$(DEPTH) \
|
||||
|
@ -30,11 +30,14 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
|
||||
self.remoteTmpDir = self.remoteJoin(self.remoteTestRoot, "tmp")
|
||||
self.remoteScriptsDir = self.remoteTestRoot
|
||||
self.remoteComponentsDir = self.remoteJoin(self.remoteTestRoot, "c")
|
||||
self.remoteModulesDir = self.remoteJoin(self.remoteTestRoot, "m")
|
||||
self.profileDir = self.remoteJoin(self.remoteTestRoot, "p")
|
||||
self.remoteDebugger = options.debugger
|
||||
self.remoteDebuggerArgs = options.debuggerArgs
|
||||
self.testingModulesDir = options.testingModulesDir
|
||||
if options.setup:
|
||||
self.setupUtilities()
|
||||
self.setupModules()
|
||||
self.setupTestDir()
|
||||
if options.localAPK:
|
||||
self.remoteAPK = self.remoteJoin(self.remoteBinDir, os.path.basename(options.localAPK))
|
||||
@ -138,6 +141,9 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
|
||||
remoteFile = self.remoteJoin(self.remoteBinDir, file)
|
||||
self.device.pushFile(os.path.join(root, file), remoteFile)
|
||||
|
||||
def setupModules(self):
|
||||
if self.testingModulesDir:
|
||||
self.device.pushDir(self.testingModulesDir, self.remoteModulesDir)
|
||||
|
||||
def setupTestDir(self):
|
||||
xpcDir = os.path.join(self.options.objdir, "_tests/xpcshell")
|
||||
@ -155,19 +161,19 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
|
||||
self.pathMapping.append(PathMapping(testdir, remoteScriptDir))
|
||||
|
||||
def buildXpcsCmd(self, testdir):
|
||||
self.xpcsCmd = [
|
||||
self.remoteJoin(self.remoteBinDir, "xpcshell"),
|
||||
'-r', self.remoteJoin(self.remoteComponentsDir, 'httpd.manifest')]
|
||||
# If using an APK, --greomni must be specified before any -e arguments.
|
||||
# change base class' paths to remote paths and use base class to build command
|
||||
self.xpcshell = self.remoteJoin(self.remoteBinDir, "xpcw")
|
||||
self.headJSPath = self.remoteJoin(self.remoteScriptsDir, 'head.js')
|
||||
self.httpdJSPath = self.remoteJoin(self.remoteComponentsDir, 'httpd.js')
|
||||
self.httpdManifest = self.remoteJoin(self.remoteComponentsDir, 'httpd.manifest')
|
||||
self.testingModulesDir = self.remoteModulesDir
|
||||
self.testharnessdir = self.remoteScriptsDir
|
||||
xpcshell.XPCShellTests.buildXpcsCmd(self, testdir)
|
||||
# remove "-g <dir> -a <dir>" and add "--greomni <apk>"
|
||||
del(self.xpcsCmd[1:5])
|
||||
if self.options.localAPK:
|
||||
self.xpcsCmd.extend(['--greomni', self.remoteAPK])
|
||||
self.xpcsCmd.extend([
|
||||
'-m',
|
||||
'-n',
|
||||
'-s',
|
||||
'-e', 'const _HTTPD_JS_PATH = "%s";' % self.remoteJoin(self.remoteComponentsDir, 'httpd.js'),
|
||||
'-e', 'const _HEAD_JS_PATH = "%s";' % self.remoteJoin(self.remoteScriptsDir, 'head.js'),
|
||||
'-f', self.remoteScriptsDir+'/head.js'])
|
||||
self.xpcsCmd.insert(3, '--greomni')
|
||||
self.xpcsCmd.insert(4, self.remoteAPK)
|
||||
|
||||
if self.remoteDebugger:
|
||||
# for example, "/data/local/gdbserver" "localhost:12345"
|
||||
@ -264,7 +270,6 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
|
||||
self.pushWrapper()
|
||||
|
||||
def launchProcess(self, cmd, stdout, stderr, env, cwd):
|
||||
cmd[0] = self.remoteJoin(self.remoteBinDir, "xpcw")
|
||||
cmd.insert(1, self.remoteHere)
|
||||
outputFile = "xpcshelloutput"
|
||||
f = open(outputFile, "w+")
|
||||
|
Loading…
Reference in New Issue
Block a user