mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
parent
b4c3aec383
commit
655dd453bd
1 changed files with 10 additions and 0 deletions
|
@ -150,6 +150,16 @@ class MachCommands(CommandBase):
|
||||||
def test_wpt(self, params=None):
|
def test_wpt(self, params=None):
|
||||||
if params is None:
|
if params is None:
|
||||||
params = []
|
params = []
|
||||||
|
else:
|
||||||
|
# Allow the first argument to be a relative path from Servo's root
|
||||||
|
# directory, converting it to `--include some/wpt/test.html`
|
||||||
|
maybe_path = path.normpath(params[0])
|
||||||
|
wpt_path = path.join('tests', 'wpt', 'web-platform-tests')
|
||||||
|
|
||||||
|
if path.exists(maybe_path) and wpt_path in maybe_path:
|
||||||
|
params = ["--include",
|
||||||
|
path.relpath(maybe_path, wpt_path)] + params[1:]
|
||||||
|
|
||||||
return subprocess.call(
|
return subprocess.call(
|
||||||
["bash", path.join("tests", "wpt", "run.sh")] + params,
|
["bash", path.join("tests", "wpt", "run.sh")] + params,
|
||||||
env=self.build_env())
|
env=self.build_env())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue