diff --git a/build/mobile/devicemanagerSUT.py b/build/mobile/devicemanagerSUT.py index 8bcb08b29ee..2ef293ce71a 100644 --- a/build/mobile/devicemanagerSUT.py +++ b/build/mobile/devicemanagerSUT.py @@ -85,7 +85,8 @@ class DeviceManagerSUT(DeviceManager): self.retrylimit = retrylimit self.retries = 0 self._sock = None - self.getDeviceRoot() + if self.getDeviceRoot() == None: + raise BaseException("Failed to connect to SUT Agent and retrieve the device root.") def _cmdNeedsResponse(self, cmd): """ Not all commands need a response from the agent: diff --git a/layout/tools/reftest/remotereftest.py b/layout/tools/reftest/remotereftest.py index 1bc91a817b2..fd73f023b65 100644 --- a/layout/tools/reftest/remotereftest.py +++ b/layout/tools/reftest/remotereftest.py @@ -370,7 +370,11 @@ user_pref("capability.principal.codebase.p2.id", "http://%s:%s"); def cleanup(self, profileDir): # Pull results back from device if (self.remoteLogFile): - self._devicemanager.getFile(self.remoteLogFile, self.localLogName) + try: + self._devicemanager.getFile(self.remoteLogFile, self.localLogName) + except: + print "ERROR: We were not able to retrieve the info from %s" % self.remoteLogFile + sys.exit(5) self._devicemanager.removeDir(self.remoteProfile) self._devicemanager.removeDir(self.remoteTestRoot) RefTest.cleanup(self, profileDir)