зеркало из https://github.com/mozilla/gecko-dev.git
Bug 756440 - Only warn when we fail cleanup steps with mobile mochitest/reftest;r=jmaher
Before we were outright failing if the test logfile was missing when cleaning up these tests. But that's generally a sign that the app failed to start up properly, which is the true issue we should be trying to catch / diagnose. Let's just print a warning here and move on.
This commit is contained in:
Родитель
b9a0562599
Коммит
771972c9f2
|
@ -347,12 +347,12 @@ user_pref("capability.principal.codebase.p2.id", "http://%s:%s");
|
||||||
|
|
||||||
def cleanup(self, profileDir):
|
def cleanup(self, profileDir):
|
||||||
# Pull results back from device
|
# Pull results back from device
|
||||||
if (self.remoteLogFile):
|
if self.remoteLogFile and \
|
||||||
try:
|
self._devicemanager.fileExists(self.remoteLogFile):
|
||||||
self._devicemanager.getFile(self.remoteLogFile, self.localLogName)
|
self._devicemanager.getFile(self.remoteLogFile, self.localLogName)
|
||||||
except:
|
else:
|
||||||
print "ERROR: We were not able to retrieve the info from %s" % self.remoteLogFile
|
print "WARNING: Unable to retrieve log file (%s) from remote " \
|
||||||
sys.exit(5)
|
"device" % self.remoteLogFile
|
||||||
self._devicemanager.removeDir(self.remoteProfile)
|
self._devicemanager.removeDir(self.remoteProfile)
|
||||||
self._devicemanager.removeDir(self.remoteTestRoot)
|
self._devicemanager.removeDir(self.remoteTestRoot)
|
||||||
RefTest.cleanup(self, profileDir)
|
RefTest.cleanup(self, profileDir)
|
||||||
|
|
|
@ -202,8 +202,12 @@ class MochiRemote(Mochitest):
|
||||||
self.localLog = options.logFile
|
self.localLog = options.logFile
|
||||||
|
|
||||||
def cleanup(self, manifest, options):
|
def cleanup(self, manifest, options):
|
||||||
self._dm.getFile(self.remoteLog, self.localLog)
|
if self._dm.fileExists(self.remoteLog):
|
||||||
self._dm.removeFile(self.remoteLog)
|
self._dm.getFile(self.remoteLog, self.localLog)
|
||||||
|
self._dm.removeFile(self.remoteLog)
|
||||||
|
else:
|
||||||
|
print "WARNING: Unable to retrieve log file (%s) from remote " \
|
||||||
|
"device" % self.remoteLog
|
||||||
self._dm.removeDir(self.remoteProfile)
|
self._dm.removeDir(self.remoteProfile)
|
||||||
|
|
||||||
if (options.pidFile != ""):
|
if (options.pidFile != ""):
|
||||||
|
|
Загрузка…
Ссылка в новой задаче