backout 272443dba538 (bug 1026290) for maybe breaking robocop

This commit is contained in:
Geoff Brown 2014-11-25 23:18:12 -07:00
Родитель 8b6159b0ac
Коммит 3ae9830ca4
2 изменённых файлов: 16 добавлений и 18 удалений

Просмотреть файл

@ -765,12 +765,6 @@ class MochitestUtilsMixin(object):
with open(os.path.join(options.profilePath, "extensions", "staged", "mochikit@mozilla.org", "chrome.manifest"), "a") as mfile:
mfile.write(chrome)
def getChromeTestDir(self):
dir = os.path.join(os.path.abspath("."), SCRIPT_DIR) + "/"
if mozinfo.isWin:
dir = "file:///" + dir.replace("\\", "/")
return dir
def addChromeToProfile(self, options):
"Adds MochiKit chrome tests to the profile."
@ -795,7 +789,9 @@ toolbar#nav-bar {
manifest = os.path.join(options.profilePath, "tests.manifest")
with open(manifest, "w") as manifestFile:
# Register chrome directory.
chrometestDir = self.getChromeTestDir()
chrometestDir = os.path.join(os.path.abspath("."), SCRIPT_DIR) + "/"
if mozinfo.isWin:
chrometestDir = "file:///" + chrometestDir.replace("\\", "/")
manifestFile.write("content mochitests %s contentaccessible=yes\n" % chrometestDir)
if options.testingModulesDir is not None:

Просмотреть файл

@ -249,9 +249,6 @@ class MochiRemote(Mochitest):
self.remoteNSPR = os.path.join(options.remoteTestRoot, "nspr")
self._dm.removeDir(self.remoteNSPR);
self._dm.mkDir(self.remoteNSPR);
self.remoteChromeTestDir = os.path.join(options.remoteTestRoot, "chrome")
self._dm.removeDir(self.remoteChromeTestDir);
self._dm.mkDir(self.remoteChromeTestDir);
def cleanup(self, options):
if self._dm.fileExists(self.remoteLog):
@ -260,7 +257,6 @@ class MochiRemote(Mochitest):
else:
self.log.warning("Unable to retrieve log file (%s) from remote device" % self.remoteLog)
self._dm.removeDir(self.remoteProfile)
self._dm.removeDir(self.remoteChromeTestDir);
# Don't leave an old robotium.config hanging around; the
# profile it references was just deleted!
deviceRoot = self._dm.getDeviceRoot()
@ -417,13 +413,19 @@ class MochiRemote(Mochitest):
else:
return super(MochiRemote, self).buildTestPath(options, testsToFilter)
def getChromeTestDir(self):
local = super(MochiRemote, self).getChromeTestDir()
local = os.path.join(local, "chrome")
remote = self.remoteChromeTestDir
self.log.info("pushing %s to %s on device..." % (local, remote))
self._dm.pushDir(local, remote)
return remote
def installChromeFile(self, filename, options):
parts = options.app.split('/')
if (parts[0] == options.app):
return "NO_CHROME_ON_DROID"
path = '/'.join(parts[:-1])
manifest = path + "/chrome/" + os.path.basename(filename)
try:
self._dm.pushFile(filename, manifest)
except devicemanager.DMError:
self.log.error("Automation Error: Unable to install Chrome files on device.")
raise
return manifest
def getLogFilePath(self, logFile):
return logFile