зеркало из https://github.com/mozilla/gecko-dev.git
Bug 805428 - Install reftest extension on B2G as app bundle, r=ahal, DONTBUILD(NPOTB)
This commit is contained in:
Родитель
69b684d597
Коммит
5830e46894
|
@ -208,6 +208,7 @@ class B2GReftest(RefTest):
|
|||
self._automation.setRemoteProfile(self.remoteProfile)
|
||||
self.localLogName = options.localLogName
|
||||
self.remoteLogFile = options.remoteLogFile
|
||||
self.bundlesDir = '/system/b2g/distribution/bundles'
|
||||
self.userJS = '/data/local/user.js'
|
||||
self.testDir = '/data/local/tests'
|
||||
self.remoteMozillaPath = '/data/b2g/mozilla'
|
||||
|
@ -227,6 +228,15 @@ class B2GReftest(RefTest):
|
|||
print "ERROR: We were not able to retrieve the info from %s" % self.remoteLogFile
|
||||
sys.exit(5)
|
||||
|
||||
# Delete any bundled extensions
|
||||
extensionDir = os.path.join(profileDir, 'extensions', 'staged')
|
||||
for filename in os.listdir(extensionDir):
|
||||
try:
|
||||
self._devicemanager._checkCmdAs(['shell', 'rm', '-rf',
|
||||
os.path.join(self.bundlesDir, filename)])
|
||||
except devicemanager.DMError:
|
||||
pass
|
||||
|
||||
# Restore the original profiles.ini.
|
||||
if self.originalProfilesIni:
|
||||
try:
|
||||
|
@ -409,6 +419,19 @@ user_pref("capability.principal.codebase.p2.id", "http://%s:%s");
|
|||
print "Automation Error: Unable to copy profile to device."
|
||||
raise
|
||||
|
||||
# Copy the extensions to the B2G bundles dir.
|
||||
extensionDir = os.path.join(profileDir, 'extensions', 'staged')
|
||||
# need to write to read-only dir
|
||||
self._devicemanager._checkCmdAs(['remount'])
|
||||
for filename in os.listdir(extensionDir):
|
||||
self._devicemanager._checkCmdAs(['shell', 'rm', '-rf',
|
||||
os.path.join(self.bundlesDir, filename)])
|
||||
try:
|
||||
self._devicemanager.pushDir(extensionDir, self.bundlesDir)
|
||||
except devicemanager.DMError:
|
||||
print "Automation Error: Unable to copy extensions to device."
|
||||
raise
|
||||
|
||||
# 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])
|
||||
|
|
Загрузка…
Ссылка в новой задаче