mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 04:35:33 +00:00
servo: Merge #5053 - default to number of available cpu for wpt-tests (from deepak1556:script_patch); r=jdm
fixes #5046 Source-Repo: https://github.com/servo/servo Source-Revision: 39273d6b533c540ff4965a660802d0ed8a9b9f92
This commit is contained in:
parent
5f7ffbe627
commit
24cd83455b
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user