Bug 1334525 - Handle tuple types and WPT manifests correctly; r?chmanchester draft
authorGregory Szorc <gps@mozilla.com>
Wed, 12 Apr 2017 15:15:36 -0700
changeset 561562 0eb674740ae59c8f5e7a5a9e1ed4c8ade0d5aff8
parent 561561 fac2c174087f3ba12ecdd739753bdd93f452ecdb
child 624021 ef70401bea189514dcc42353e6e73388262d5565
push id53782
push userbmo:gps@mozilla.com
push dateWed, 12 Apr 2017 22:17:12 +0000
reviewerschmanchester
bugs1334525
milestone55.0a1
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
python/mozbuild/mozbuild/frontend/reader.py
--- 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: