From 2d8b40990be98471b228ca1eb2a202a3fae84e2d Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Wed, 15 Jan 2014 09:37:12 -0500 Subject: [PATCH] Bug 813742 - add --parallel option for mach reftest-esque things; r=ted --- layout/tools/reftest/mach_commands.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/layout/tools/reftest/mach_commands.py b/layout/tools/reftest/mach_commands.py index c0f572ce8cd..157d41ef637 100644 --- a/layout/tools/reftest/mach_commands.py +++ b/layout/tools/reftest/mach_commands.py @@ -138,7 +138,7 @@ class ReftestRunner(MozbuildObject): return reftest.run_remote_reftests(parser, options, args) def run_desktop_test(self, test_file=None, filter=None, suite=None, - debugger=None): + debugger=None, parallel=False): """Runs a reftest. test_file is a path to a test file. It can be a relative path from the @@ -153,6 +153,8 @@ class ReftestRunner(MozbuildObject): debugger is the program name (in $PATH) or the full path of the debugger to run. + + parallel indicates whether tests should be run in parallel or not. """ if suite not in ('reftest', 'reftest-ipc', 'crashtest', 'crashtest-ipc'): @@ -175,6 +177,9 @@ class ReftestRunner(MozbuildObject): extra_args.append('--debugger=%s' % debugger) pass_thru = True + if parallel: + extra_args.append('--run-tests-in-parallel') + if extra_args: args = [os.environ.get(b'EXTRA_TEST_ARGS', '')] args.extend(extra_args) @@ -202,6 +207,10 @@ def ReftestCommand(func): 'reftest.list. If omitted, the entire test suite is executed.') func = path(func) + parallel = CommandArgument('--parallel', action='store_true', + help='Run tests in parallel.') + func = parallel(func) + return func def B2GCommand(func):