зеркало из https://github.com/mozilla/gecko-dev.git
Bug 817235 - Make xpcshell tests work with sutAgent; r=jmaher
This commit is contained in:
Родитель
15f2adef52
Коммит
a810388f04
|
@ -25,12 +25,16 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
|
||||||
self.device = devmgr
|
self.device = devmgr
|
||||||
self.pathMapping = []
|
self.pathMapping = []
|
||||||
self.remoteTestRoot = self.device.getTestRoot("xpcshell")
|
self.remoteTestRoot = self.device.getTestRoot("xpcshell")
|
||||||
# Terse directory names are used here ("b" for a binaries directory)
|
# remoteBinDir contains xpcshell and its wrapper script, both of which must
|
||||||
|
# be executable. Since +x permissions cannot usually be set on /mnt/sdcard,
|
||||||
|
# and the test root may be on /mnt/sdcard, remoteBinDir is set to be on
|
||||||
|
# /data/local, always.
|
||||||
|
self.remoteBinDir = "/data/local/xpcb"
|
||||||
|
# Terse directory names are used here ("c" for the components directory)
|
||||||
# to minimize the length of the command line used to execute
|
# to minimize the length of the command line used to execute
|
||||||
# xpcshell on the remote device. adb has a limit to the number
|
# xpcshell on the remote device. adb has a limit to the number
|
||||||
# of characters used in a shell command, and the xpcshell command
|
# of characters used in a shell command, and the xpcshell command
|
||||||
# line can be quite complex.
|
# line can be quite complex.
|
||||||
self.remoteBinDir = self.remoteJoin(self.remoteTestRoot, "b")
|
|
||||||
self.remoteTmpDir = self.remoteJoin(self.remoteTestRoot, "tmp")
|
self.remoteTmpDir = self.remoteJoin(self.remoteTestRoot, "tmp")
|
||||||
self.remoteScriptsDir = self.remoteTestRoot
|
self.remoteScriptsDir = self.remoteTestRoot
|
||||||
self.remoteComponentsDir = self.remoteJoin(self.remoteTestRoot, "c")
|
self.remoteComponentsDir = self.remoteJoin(self.remoteTestRoot, "c")
|
||||||
|
@ -83,6 +87,10 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
|
||||||
return local
|
return local
|
||||||
|
|
||||||
def setupUtilities(self):
|
def setupUtilities(self):
|
||||||
|
if (not self.device.dirExists(self.remoteBinDir)):
|
||||||
|
# device.mkDir may fail here where shellCheckOutput may succeed -- see bug 817235
|
||||||
|
self.device.shellCheckOutput(["mkdir", self.remoteBinDir]);
|
||||||
|
|
||||||
remotePrefDir = self.remoteJoin(self.remoteBinDir, "defaults/pref")
|
remotePrefDir = self.remoteJoin(self.remoteBinDir, "defaults/pref")
|
||||||
if (self.device.dirExists(self.remoteTmpDir)):
|
if (self.device.dirExists(self.remoteTmpDir)):
|
||||||
self.device.removeDir(self.remoteTmpDir)
|
self.device.removeDir(self.remoteTmpDir)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче