Bug 1127928 - Increase pushDir timeout for xpcshell tests directory to 600 seconds; r=wlach

This commit is contained in:
Geoff Brown 2015-01-30 15:23:41 -07:00
parent a2e1094131
commit 3ee5171ca3
2 changed files with 7 additions and 3 deletions

View File

@ -249,13 +249,14 @@ class DeviceManagerADB(DeviceManager):
self._logger.warning(traceback.format_exc())
self._logger.warning("zip/unzip failure: falling back to normal push")
self._useZip = False
self.pushDir(localDir, remoteDir, retryLimit=retryLimit)
self.pushDir(localDir, remoteDir, retryLimit=retryLimit, timeout=timeout)
else:
tmpDir = tempfile.mkdtemp()
# copytree's target dir must not already exist, so create a subdir
tmpDirTarget = os.path.join(tmpDir, "tmp")
shutil.copytree(localDir, tmpDirTarget)
self._checkCmd(["push", tmpDirTarget, remoteDir], retryLimit=retryLimit)
self._checkCmd(["push", tmpDirTarget, remoteDir],
retryLimit=retryLimit, timeout=timeout)
mozfile.remove(tmpDir)
def dirExists(self, remotePath):

View File

@ -455,7 +455,10 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
def setupTestDir(self):
print 'pushing %s' % self.xpcDir
try:
self.device.pushDir(self.xpcDir, self.remoteScriptsDir, retryLimit=10)
# The tests directory can be quite large: 5000 files and growing!
# Sometimes - like on a low-end aws instance running an emulator - the push
# may exceed the default 5 minute timeout, so we increase it here to 10 minutes.
self.device.pushDir(self.xpcDir, self.remoteScriptsDir, timeout=600, retryLimit=10)
except TypeError:
# Foopies have an older mozdevice ver without retryLimit
self.device.pushDir(self.xpcDir, self.remoteScriptsDir)