From 23308eb8c910bf7e1fa266f4817e3431b946eb42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Muszy=C3=85=E2=80=9Eski?= Date: Tue, 17 Dec 2013 10:56:29 -0500 Subject: [PATCH] Bug 932948 - Running mach mochitest-a11y with installed extension. r=ted --HG-- extra : rebase_source : 48b5025f8df30a697ddc5dd65235583bdc6f1f55 --- testing/mochitest/mach_commands.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/testing/mochitest/mach_commands.py b/testing/mochitest/mach_commands.py index 33536ec8759..210ac5cb862 100644 --- a/testing/mochitest/mach_commands.py +++ b/testing/mochitest/mach_commands.py @@ -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):