mirror of
https://github.com/servo/servo.git
synced 2025-07-02 04:53:39 +01:00
Add iterpath and iterdir to CSS test runner.
This allows running a subset of the CSS tests again, by specifying a directory or single test. Fixes #18931.
This commit is contained in:
parent
fe16c1d5c3
commit
d42a00db60
1 changed files with 14 additions and 0 deletions
|
@ -46,6 +46,20 @@ class Manifest(object):
|
|||
for path, tests in sorted(iteritems(self._data[item_type])):
|
||||
yield item_type, path, tests
|
||||
|
||||
def iterpath(self, path):
|
||||
for type_tests in self._data.values():
|
||||
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue