Back out f626859690df (bug 736105) because of frequent robocop testAboutPage failures

This commit is contained in:
Matt Brubeck 2012-03-19 11:28:58 -07:00
parent b506271f8e
commit bc9065e468
2 changed files with 8 additions and 29 deletions

View File

@ -543,12 +543,6 @@ class DeviceManagerSUT(DeviceManager):
except AgentError:
return None
# HACK: when using am instrument, we block on the exec call. Also this results in launching
# org.mozilla.fennec which will not be found in processExist().
if re.search('am instrument -w -e class org.mozilla', appname):
print "terminating early due to am instrument vs org.mozilla.f*"
return 1
# wait up to 30 seconds for process to start up
timeslept = 0
while (timeslept <= 30):

View File

@ -223,7 +223,6 @@ class MochiRemote(Mochitest):
_dm = None
localProfile = None
logLines = []
_reuseProfile = False
def __init__(self, automation, devmgr, options):
self._automation = automation
@ -237,12 +236,6 @@ class MochiRemote(Mochitest):
def cleanup(self, manifest, options):
self._dm.getFile(self.remoteLog, self.localLog)
self._dm.removeFile(self.remoteLog)
if self._reuseProfile:
print "Not removing profile since we need it in the next run!"
self._dm.removeFile(self.remoteProfile + '/.parentlock');
return
self._dm.removeDir(self.remoteProfile)
if (options.pidFile != ""):
@ -322,10 +315,9 @@ class MochiRemote(Mochitest):
options.profilePath = self.localProfile
manifest = Mochitest.buildProfile(self, options)
self.localProfile = options.profilePath
if not self._reuseProfile:
self._dm.removeDir(self.remoteProfile)
if self._dm.pushDir(options.profilePath, self.remoteProfile) == None:
raise devicemanager.FileError("Unable to copy profile to device.")
self._dm.removeDir(self.remoteProfile)
if self._dm.pushDir(options.profilePath, self.remoteProfile) == None:
raise devicemanager.FileError("Unable to copy profile to device.")
options.profilePath = self.remoteProfile
return manifest
@ -336,9 +328,8 @@ class MochiRemote(Mochitest):
options.profilePath = self.localProfile
retVal = Mochitest.buildURLOptions(self, options, env)
#we really need testConfig.js (for browser chrome)
if not self._reuseProfile:
if self._dm.pushDir(options.profilePath, self.remoteProfile) == None:
raise devicemanager.FileError("Unable to copy profile to device.")
if self._dm.pushDir(options.profilePath, self.remoteProfile) == None:
raise devicemanager.FileError("Unable to copy profile to device.")
options.profilePath = self.remoteProfile
options.logFile = self.localLog
@ -428,7 +419,6 @@ def main():
dm = devicemanagerADB.DeviceManagerADB()
else:
dm = devicemanagerSUT.DeviceManagerSUT(options.deviceIP, options.devicePort)
auto.setDeviceManager(dm)
options = parser.verifyRemoteOptions(options, auto)
if (options == None):
@ -496,14 +486,12 @@ def main():
try:
retVal = mochitest.runTests(options)
mochitest.addLogData()
mochitest._reuseProfile = True
except:
print "TEST-UNEXPECTED-FAIL | %s | Exception caught while running robocop tests." % sys.exc_info()[1]
mochitest.stopWebServer(options)
mochitest.stopWebSocketServer(options)
mochitest._reuseProfile = False
try:
mochitest.cleanup(None, options)
self.cleanup(None, options)
except:
pass
sys.exit(1)
@ -511,10 +499,7 @@ def main():
print "No tests run. Did you pass an invalid TEST_PATH?"
retVal = 1
retVal = mochitest.printLog()
# We do not cleanup the profile for each run of robocop until the end
mochitest._reuseProfile = False
mochitest.cleanup(None, options)
retVal = mochitest.printLog()
else:
try:
retVal = mochitest.runTests(options)
@ -523,7 +508,7 @@ def main():
mochitest.stopWebServer(options)
mochitest.stopWebSocketServer(options)
try:
mochitest.cleanup(None, options)
self.cleanup(None, options)
except:
pass
sys.exit(1)