Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug 821012 - B2G emulator install_gecko step should use busybox if av…

…ailable, r=jgriffin
  • Loading branch information...
commit a25d73fe6e040cefc62a452083f1a229a6727ac2 1 parent b435d73
@ahal ahal authored
Showing with 5 additions and 22 deletions.
  1. +5 −22 testing/marionette/client/marionette/emulator.py
View
27 testing/marionette/client/marionette/emulator.py
@@ -374,8 +374,6 @@ def install_gecko(self, gecko_path, marionette):
# gecko in order to avoid an adb bug in which adb will sometimes
# hang indefinitely while copying large files to the system
# partition.
- push_attempts = 10
-
print 'installing gecko binaries...'
# see bug 809437 for the path that lead to this madness
@@ -384,18 +382,7 @@ def install_gecko(self, gecko_path, marionette):
self._run_adb(['remount'])
self.dm.removeDir('/data/local/b2g')
self.dm.mkDir('/data/local/b2g')
- for root, dirs, files in os.walk(gecko_path):
- for filename in files:
- rel_path = os.path.relpath(os.path.join(root, filename), gecko_path)
- data_local_file = os.path.join('/data/local/b2g', rel_path)
- for retry in range(1, push_attempts + 1):
- print 'pushing', data_local_file, '(attempt %s of %s)' % (retry, push_attempts)
- try:
- self.dm.pushFile(os.path.join(root, filename), data_local_file)
- break
- except DMError:
- if retry == push_attempts:
- raise
+ self.dm.pushDir(gecko_path, '/data/local/b2g', retryLimit=10)
self.dm.shellCheckOutput(['stop', 'b2g'])
@@ -404,15 +391,11 @@ def install_gecko(self, gecko_path, marionette):
rel_path = os.path.relpath(os.path.join(root, filename), gecko_path)
data_local_file = os.path.join('/data/local/b2g', rel_path)
system_b2g_file = os.path.join('/system/b2g', rel_path)
- print 'copying', data_local_file, 'to', system_b2g_file
- try:
- self.dm.shellCheckOutput(['dd',
- 'if=%s' % data_local_file,
- 'of=%s' % system_b2g_file])
- except DMError:
- if retry == push_attempts:
- raise
+ print 'copying', data_local_file, 'to', system_b2g_file
+ self.dm.shellCheckOutput(['dd',
+ 'if=%s' % data_local_file,
+ 'of=%s' % system_b2g_file])
self.restart_b2g()
except (DMError, MarionetteException):

0 comments on commit a25d73f

Please sign in to comment.
Something went wrong with that request. Please try again.