Bug 1334525 - Handle tuple types and WPT manifests correctly; r?chmanchester
beb43155b7a6 changed WPT items to be 3-tuples instead of 2-tuples.
This broke test_defaults_for_path().
MozReview-Commit-ID: 7M0RcQ7bOIU
--- a/python/mozbuild/mozbuild/frontend/reader.py
+++ b/python/mozbuild/mozbuild/frontend/reader.py
@@ -1411,17 +1411,17 @@ class BuildReader(object):
for ctx in ctxs:
for key in ctx:
if key not in test_manifest_contexts:
continue
for paths, obj in ctx[key]:
if isinstance(paths, tuple):
path, tests_root = paths
tests_root = mozpath.join(ctx.relsrcdir, tests_root)
- for t in (mozpath.join(tests_root, path) for path, _ in obj):
+ for t in (mozpath.join(tests_root, it[0]) for it in obj):
result_context.test_files.add(mozpath.dirname(t) + '/**')
else:
for t in obj.tests:
if isinstance(t, tuple):
path, _ = t
relpath = mozpath.relpath(path,
self.config.topsrcdir)
else: