mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Allow running wpt directories by path on the command line.
This commit is contained in:
parent
ca340eca39
commit
933b42ef46
2 changed files with 11 additions and 1 deletions
|
@ -51,6 +51,15 @@ class Manifest(object):
|
||||||
for test in type_tests.get(path, set()):
|
for test in type_tests.get(path, set()):
|
||||||
yield test
|
yield test
|
||||||
|
|
||||||
|
def iterdir(self, dir_name):
|
||||||
|
if not dir_name.endswith(os.path.sep):
|
||||||
|
dir_name = dir_name + os.path.sep
|
||||||
|
for type_tests in self._data.values():
|
||||||
|
for path, tests in type_tests.iteritems():
|
||||||
|
if path.startswith(dir_name):
|
||||||
|
for test in tests:
|
||||||
|
yield test
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def reftest_nodes_by_url(self):
|
def reftest_nodes_by_url(self):
|
||||||
if self._reftest_nodes_by_url is None:
|
if self._reftest_nodes_by_url is None:
|
||||||
|
|
|
@ -93,7 +93,8 @@ class IncludeManifest(ManifestItem):
|
||||||
for manifest, data in test_manifests.iteritems():
|
for manifest, data in test_manifests.iteritems():
|
||||||
found = False
|
found = False
|
||||||
rel_path = os.path.relpath(path, data["tests_path"])
|
rel_path = os.path.relpath(path, data["tests_path"])
|
||||||
for test in manifest.iterpath(rel_path):
|
iterator = manifest.iterpath if os.path.isfile(path) else manifest.iterdir
|
||||||
|
for test in iterator(rel_path):
|
||||||
if not hasattr(test, "url"):
|
if not hasattr(test, "url"):
|
||||||
continue
|
continue
|
||||||
url = test.url
|
url = test.url
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue