зеркало из https://github.com/mozilla/gecko-dev.git
Bug 872244 - Dump ANR stack traces after Android tests; r=jmaher
This commit is contained in:
Родитель
aa04b55496
Коммит
79a1c821af
|
@ -116,7 +116,33 @@ class RemoteAutomation(Automation):
|
||||||
break
|
break
|
||||||
return found_exception
|
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):
|
def checkForCrashes(self, directory, symbolsPath):
|
||||||
|
self.checkForANRs()
|
||||||
|
|
||||||
logcat = self._devicemanager.getLogcat(filterOutRegexps=fennecLogcatFilters)
|
logcat = self._devicemanager.getLogcat(filterOutRegexps=fennecLogcatFilters)
|
||||||
javaException = self.checkForJavaException(logcat)
|
javaException = self.checkForJavaException(logcat)
|
||||||
if javaException:
|
if javaException:
|
||||||
|
|
|
@ -255,6 +255,7 @@ class RemoteReftest(RefTest):
|
||||||
self.SERVER_STARTUP_TIMEOUT = 180
|
self.SERVER_STARTUP_TIMEOUT = 180
|
||||||
else:
|
else:
|
||||||
self.SERVER_STARTUP_TIMEOUT = 90
|
self.SERVER_STARTUP_TIMEOUT = 90
|
||||||
|
self.automation.deleteANRs()
|
||||||
|
|
||||||
def findPath(self, paths, filename = None):
|
def findPath(self, paths, filename = None):
|
||||||
for path in paths:
|
for path in paths:
|
||||||
|
|
|
@ -212,6 +212,7 @@ class MochiRemote(Mochitest):
|
||||||
self._automation.setRemoteProfile(self.remoteProfile)
|
self._automation.setRemoteProfile(self.remoteProfile)
|
||||||
self.remoteLog = options.remoteLogFile
|
self.remoteLog = options.remoteLogFile
|
||||||
self.localLog = options.logFile
|
self.localLog = options.logFile
|
||||||
|
self._automation.deleteANRs()
|
||||||
|
|
||||||
def cleanup(self, manifest, options):
|
def cleanup(self, manifest, options):
|
||||||
if self._dm.fileExists(self.remoteLog):
|
if self._dm.fileExists(self.remoteLog):
|
||||||
|
|
Загрузка…
Ссылка в новой задаче