Bug 647404 - automation.py: fix extractZip() and installExtension(); (Cv2) Explicitly support an optional path in --install-extension.

r=jmaher.
This commit is contained in:
Serge Gautherie 2011-04-14 17:28:46 +02:00
Родитель 05677b1b45
Коммит a5e472038a
2 изменённых файлов: 6 добавлений и 8 удалений

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

@ -177,9 +177,7 @@ class RefTest(object):
def installExtensionsToProfile(self, options, profileDir):
"Install the specified extensions on the command line to the testing profile."
for f in options.extensionsToInstall:
abspath = self.getFullPath(f)
extensionID = f[:f.rfind(".")]
self.automation.installExtension(abspath, profileDir, extensionID)
self.automation.installExtension(self.getFullPath(f), profileDir)
class ReftestOptions(OptionParser):
@ -245,7 +243,8 @@ class ReftestOptions(OptionParser):
action = "append", dest = "extensionsToInstall",
help = "install the specified extension in the testing profile."
"The extension file's name should be <id>.xpi where <id> is"
"the extension's id as indicated in its install.rdf.")
"the extension's id as indicated in its install.rdf."
"An optional path can be specified too.")
defaults["extensionsToInstall"] = []
self.set_defaults(**defaults)

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

@ -211,7 +211,8 @@ class MochitestOptions(optparse.OptionParser):
action = "append", dest = "extensionsToInstall",
help = "install the specified extension in the testing profile."
"The extension file's name should be <id>.xpi where <id> is"
"the extension's id as indicated in its install.rdf.")
"the extension's id as indicated in its install.rdf."
"An optional path can be specified too.")
defaults["extensionsToInstall"] = []
self.add_option("--profile-path", action = "store",
@ -771,9 +772,7 @@ overlay chrome://browser/content/browser.xul chrome://mochikit/content/browser-t
def installExtensionsToProfile(self, options):
"Install the specified extensions on the command line to the testing profile."
for f in options.extensionsToInstall:
abspath = self.getFullPath(f)
extensionID = f[:f.rfind(".")]
self.automation.installExtension(abspath, options.profilePath, extensionID)
self.automation.installExtension(self.getFullPath(f), options.profilePath)
def main():
automation = Automation()