Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update web-platform-tests #18756

Merged
merged 9 commits into from Oct 5, 2017

Allow running wpt directories by path on the command line.

  • Loading branch information
jdm authored and Ms2ger committed Oct 4, 2017
commit 933b42ef46bd7ba0b6e56308638dd5073f0226dc
@@ -51,6 +51,15 @@ def iterpath(self, path):
for test in type_tests.get(path, set()):
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
def reftest_nodes_by_url(self):
if self._reftest_nodes_by_url is None:
@@ -93,7 +93,8 @@ def _add_rule(self, test_manifests, url, direction):
for manifest, data in test_manifests.iteritems():
found = False
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"):
continue
url = test.url
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.