Bug 872244 - Dump ANR stack traces after Android tests; r=jmaher

This commit is contained in:
Geoff Brown 2013-05-16 14:32:52 -06:00
Родитель aa04b55496
Коммит 79a1c821af
3 изменённых файлов: 28 добавлений и 0 удалений

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

@ -116,7 +116,33 @@ class RemoteAutomation(Automation):
break
return found_exception
def deleteANRs(self):
# delete ANR traces.txt file; usually need root permissions
traces = "/data/anr/traces.txt"
try:
self._devicemanager.shellCheckOutput(['rm', traces], root=True)
except DMError:
print "Error deleting %s" % traces
pass
def checkForANRs(self):
traces = "/data/anr/traces.txt"
if self._devicemanager.fileExists(traces):
try:
t = self._devicemanager.pullFile(traces)
print "Contents of %s:" % traces
print t
# Once reported, delete traces
self.deleteANRs()
except DMError:
print "Error pulling %s" % traces
pass
else:
print "%s not found" % traces
def checkForCrashes(self, directory, symbolsPath):
self.checkForANRs()
logcat = self._devicemanager.getLogcat(filterOutRegexps=fennecLogcatFilters)
javaException = self.checkForJavaException(logcat)
if javaException:

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

@ -255,6 +255,7 @@ class RemoteReftest(RefTest):
self.SERVER_STARTUP_TIMEOUT = 180
else:
self.SERVER_STARTUP_TIMEOUT = 90
self.automation.deleteANRs()
def findPath(self, paths, filename = None):
for path in paths:

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

@ -212,6 +212,7 @@ class MochiRemote(Mochitest):
self._automation.setRemoteProfile(self.remoteProfile)
self.remoteLog = options.remoteLogFile
self.localLog = options.logFile
self._automation.deleteANRs()
def cleanup(self, manifest, options):
if self._dm.fileExists(self.remoteLog):