From d864243fa2953e2aabc540eafafe485d3d818e1c Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Tue, 21 Apr 2015 16:44:42 -0600 Subject: [PATCH] Bug 1156422 - Improve robustness of logcat collection in checkForCrashes; r=bc --- build/mobile/remoteautomation.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/mobile/remoteautomation.py b/build/mobile/remoteautomation.py index 8dd1b1f6929..2a6a684e1cd 100644 --- a/build/mobile/remoteautomation.py +++ b/build/mobile/remoteautomation.py @@ -180,7 +180,13 @@ class RemoteAutomation(Automation): self.checkForANRs() self.checkForTombstones() - logcat = self._devicemanager.getLogcat(filterOutRegexps=fennecLogcatFilters) + try: + logcat = self._devicemanager.getLogcat(filterOutRegexps=fennecLogcatFilters) + except DMError: + print "getLogcat threw DMError; re-trying just once..." + time.sleep(1) + logcat = self._devicemanager.getLogcat(filterOutRegexps=fennecLogcatFilters) + javaException = mozcrash.check_for_java_exception(logcat) if javaException: return True