diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-02-28 12:57:50 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-02-28 12:57:50 -0700 |
commit | 39273d6b533c540ff4965a660802d0ed8a9b9f92 (patch) | |
tree | ab38a85e0f43e94629d1502e27b64c7472894867 /python/servo/testing_commands.py | |
parent | 75060f41dbd6c9a6e8865f1c1c88f5b984b199f7 (diff) | |
parent | 7b9241bddb7b6498af14e1e237bff364afb04b01 (diff) | |
download | servo-39273d6b533c540ff4965a660802d0ed8a9b9f92.tar.gz servo-39273d6b533c540ff4965a660802d0ed8a9b9f92.zip |
auto merge of #5053 : deepak1556/servo/script_patch, r=jdm
fixes #5046
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 10959cd021d..95dd71af1e9 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -16,6 +16,7 @@ from mach.decorators import ( from servo.command_base import CommandBase import tidy +import multiprocessing @CommandProvider @@ -214,9 +215,12 @@ class MachCommands(CommandBase): description='Run the web platform tests', category='testing') @CommandArgument( - 'params', default=None, nargs='...', - help="Command-line arguments to be passed through to wpt/run.sh") - def test_wpt(self, params=None): + '--processes', default=None, + help="Number of servo processes to spawn") + @CommandArgument( + "params", default=None, nargs='...', + help="command-line arguments to be passed through to wpt/run.sh") + def test_wpt(self, processes=None, params=None): if params is None: params = [] else: @@ -227,7 +231,10 @@ class MachCommands(CommandBase): if path.exists(maybe_path) and wpt_path in maybe_path: params = ["--include", - path.relpath(maybe_path, wpt_path)] + params[1:] + path.relpath(maybe_path, wpt_path)] + + processes = str(multiprocessing.cpu_count()) if processes is None else processes + params = params + ["--processes", processes] return subprocess.call( ["bash", path.join("tests", "wpt", "run.sh")] + params, |