Bug 932948 - Running mach mochitest-a11y with installed extension. r=ted

--HG--
extra : rebase_source : 48b5025f8df30a697ddc5dd65235583bdc6f1f55
This commit is contained in:
Kamil Muszyński 2013-12-17 10:56:29 -05:00
parent 6908cf12ad
commit 23308eb8c9

View File

@ -198,7 +198,7 @@ class MochitestRunner(MozbuildObject):
chunk_by_dir=0, total_chunks=None, this_chunk=None, jsdebugger=False,
debug_on_failure=False, start_at=None, end_at=None, e10s=False,
dmd=False, dump_output_directory=None, dump_about_memory_after_test=False,
dump_dmd_after_test=False):
dump_dmd_after_test=False, install_extension=None):
"""Runs a mochitest.
test_file is a path to a test file. It can be a relative path from the
@ -312,6 +312,8 @@ class MochitestRunner(MozbuildObject):
mozinfo.update({"e10s": e10s}) # for test manifest parsing.
options.failureFile = failure_file_path
if install_extension != None:
options.extensionsToInstall = [os.path.join(self.topsrcdir,install_extension)]
if test_path:
test_root = runner.getTestRoot(options)
@ -481,6 +483,11 @@ def MochitestCommand(func):
'executed.')
func = path(func)
install_extension = CommandArgument('--install-extension',
help='Install given extension before running selected tests. ' \
'Parameter is a path to xpi file.')
func = install_extension(func)
return func
def B2GCommand(func):