servo: Merge #7789 - allow `./mach test` to run tests in tests/wpt/mozilla/ (from 6112:master); r=mbrubeck

Allows running WPT tests in the tests/wpt/mozilla/ directory by using commands such as:

```
./mach test tests/wpt/mozilla/tests/mozilla/union.html
```

Fixes #7772.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9a4eb565c4a423ed1278a5e28ad06775695861da
This commit is contained in:
Nicolas 2015-09-29 19:58:28 -06:00
Родитель 0f5d421cf7
Коммит accefa4a75
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -81,18 +81,19 @@ class MachCommands(CommandBase):
suites = OrderedDict([
("tidy", {}),
("ref", {"kwargs": {"kind": render_mode},
"path": path.abspath(path.join("tests", "ref")),
"paths": [path.abspath(path.join("tests", "ref"))],
"include_arg": "name"}),
("wpt", {"kwargs": {"release": release},
"path": path.abspath(path.join("tests", "wpt", "web-platform-tests")),
"paths": [path.abspath(path.join("tests", "wpt", "web-platform-tests")),
path.abspath(path.join("tests", "wpt", "mozilla"))],
"include_arg": "include"}),
("css", {"kwargs": {"release": release},
"path": path.abspath(path.join("tests", "wpt", "css-tests")),
"paths": [path.abspath(path.join("tests", "wpt", "css-tests"))],
"include_arg": "include"}),
("unit", {}),
])
suites_by_prefix = {v["path"]: k for k, v in suites.iteritems() if "path" in v}
suites_by_prefix = {path: k for k, v in suites.iteritems() if "paths" in v for path in v["paths"]}
selected_suites = OrderedDict()