Bug 797177 - Fix missed calls to checkCmd within B2G automation, r=mikeh; DONTBUILD because NPOTB

This commit is contained in:
Andrew Halberstadt 2012-10-05 16:06:02 -04:00
Родитель 6042482b64
Коммит 1f19f8c07e
2 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -169,10 +169,10 @@ class B2GRemoteAutomation(Automation):
def restartB2G(self):
# TODO hangs in subprocess.Popen without this delay
time.sleep(5)
self._devicemanager.checkCmd(['shell', 'stop', 'b2g'])
self._devicemanager._checkCmd(['shell', 'stop', 'b2g'])
# Wait for a bit to make sure B2G has completely shut down.
time.sleep(10)
self._devicemanager.checkCmd(['shell', 'start', 'b2g'])
self._devicemanager._checkCmd(['shell', 'start', 'b2g'])
if self._is_emulator:
self.marionette.emulator.wait_for_port()
@ -232,9 +232,9 @@ class B2GRemoteAutomation(Automation):
# Set up port forwarding again for Marionette, since any that
# existed previously got wiped out by the reboot.
if not self._is_emulator:
self._devicemanager.checkCmd(['forward',
'tcp:%s' % self.marionette.port,
'tcp:%s' % self.marionette.port])
self._devicemanager._checkCmd(['forward',
'tcp:%s' % self.marionette.port,
'tcp:%s' % self.marionette.port])
if self._is_emulator:
self.marionette.emulator.wait_for_port()

Просмотреть файл

@ -234,11 +234,11 @@ class B2GReftest(RefTest):
self._devicemanager.removeDir(self.remoteTestRoot)
# Restore the original user.js.
self._devicemanager.checkCmdAs(['shell', 'rm', '-f', self.userJS])
self._devicemanager._checkCmdAs(['shell', 'rm', '-f', self.userJS])
if self._devicemanager.useDDCopy:
self._devicemanager.checkCmdAs(['shell', 'dd', 'if=%s.orig' % self.userJS, 'of=%s' % self.userJS])
self._devicemanager._checkCmdAs(['shell', 'dd', 'if=%s.orig' % self.userJS, 'of=%s' % self.userJS])
else:
self._devicemanager.checkCmdAs(['shell', 'cp', '%s.orig' % self.userJS, self.userJS])
self._devicemanager._checkCmdAs(['shell', 'cp', '%s.orig' % self.userJS, self.userJS])
# We've restored the original profile, so reboot the device so that
# it gets picked up.
@ -403,11 +403,11 @@ user_pref("capability.principal.codebase.p2.id", "http://%s:%s");
# In B2G, user.js is always read from /data/local, not the profile
# directory. Backup the original user.js first so we can restore it.
self._devicemanager.checkCmdAs(['shell', 'rm', '-f', '%s.orig' % self.userJS])
self._devicemanager._checkCmdAs(['shell', 'rm', '-f', '%s.orig' % self.userJS])
if self._devicemanager.useDDCopy:
self._devicemanager.checkCmdAs(['shell', 'dd', 'if=%s' % self.userJS, 'of=%s.orig' % self.userJS])
self._devicemanager._checkCmdAs(['shell', 'dd', 'if=%s' % self.userJS, 'of=%s.orig' % self.userJS])
else:
self._devicemanager.checkCmdAs(['shell', 'cp', self.userJS, '%s.orig' % self.userJS])
self._devicemanager._checkCmdAs(['shell', 'cp', self.userJS, '%s.orig' % self.userJS])
self._devicemanager.pushFile(os.path.join(profileDir, "user.js"), self.userJS)
self.updateProfilesIni(self.remoteProfile)