Bug 809753 - Avoid python exception when maxTime is None; r=edmorley, DONTBUILD
authorGeoff Brown <gbrown@mozilla.com>
Wed, 28 Nov 2012 13:43:58 -0700
changeset 114416 99216975f48bab54713831002e1a0d88379d046e
parent 114415 83c8b42da6ed23147b948e26decc9e635519a120
child 114417 38324b54e6d68f761e1409d73991c941c486d150
push id23917
push useremorley@mozilla.com
push dateThu, 29 Nov 2012 14:20:29 +0000
treeherdermozilla-central@c72d38e7a212 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedmorley, DONTBUILD
bugs809753
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 809753 - Avoid python exception when maxTime is None; r=edmorley, DONTBUILD
build/mobile/remoteautomation.py
--- a/build/mobile/remoteautomation.py
+++ b/build/mobile/remoteautomation.py
@@ -72,18 +72,22 @@ class RemoteAutomation(Automation):
             or for maxTime elapse, in which case kill the process regardless.
         """
         # maxTime is used to override the default timeout, we should honor that
         status = proc.wait(timeout = maxTime)
         self.lastTestSeen = proc.getLastTestSeen
 
         if (status == 1 and self._devicemanager.processExist(proc.procName)):
             # Then we timed out, make sure Fennec is dead
-            print "TEST-UNEXPECTED-FAIL | %s | application ran for longer than " \
-                  "allowed maximum time of %d seconds" % (self.lastTestSeen, int(maxTime))
+            if maxTime:
+                print "TEST-UNEXPECTED-FAIL | %s | application ran for longer than " \
+                      "allowed maximum time of %s seconds" % (self.lastTestSeen, maxTime)
+            else:
+                print "TEST-UNEXPECTED-FAIL | %s | application ran for longer than " \
+                      "allowed maximum time" % (self.lastTestSeen)
             proc.kill()
 
         return status
 
     def checkForCrashes(self, directory, symbolsPath):
         remoteCrashDir = self._remoteProfile + '/minidumps/'
         if not self._devicemanager.dirExists(remoteCrashDir):
             # As of this writing, the minidumps directory is automatically