Bug 1317101 - Part 8a: Read defaults from ancestor manifests when processing test metadata. r=chmanchester
authorKris Maglione <maglione.k@gmail.com>
Sat, 12 Nov 2016 18:30:47 -0800
changeset 370496 2fa61db0ad05e0d55f58ed2046c8a41503a3ce13
parent 370495 3330301202ab60286f826d61a473f1e1a8057301
child 370497 7651bcf89bf1669c7cd3c1d954ccd440f91599bf
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1317101
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1317101 - Part 8a: Read defaults from ancestor manifests when processing test metadata. r=chmanchester MozReview-Commit-ID: 90ldX6DuKBy
python/mozbuild/mozbuild/testing.py
--- a/python/mozbuild/mozbuild/testing.py
+++ b/python/mozbuild/mozbuild/testing.py
@@ -60,21 +60,27 @@ class TestMetadata(object):
             test_data = pickle.load(fh)
         defaults = None
         if test_defaults:
             with open(test_defaults, 'rb') as fh:
                 defaults = pickle.load(fh)
         for path, tests in test_data.items():
             for metadata in tests:
                 if defaults:
-                    manifest = metadata['manifest']
-                    manifest_defaults = defaults.get(manifest)
-                    if manifest_defaults:
-                        metadata = manifestparser.combine_fields(manifest_defaults,
-                                                                 metadata)
+                    defaults_manifests = [metadata['manifest']]
+
+                    ancestor_manifest = metadata.get('ancestor-manifest')
+                    if ancestor_manifest:
+                        defaults_manifests.append(ancestor_manifest)
+
+                    for manifest in defaults_manifests:
+                        manifest_defaults = defaults.get(manifest)
+                        if manifest_defaults:
+                            metadata = manifestparser.combine_fields(manifest_defaults,
+                                                                     metadata)
                 self._tests_by_path[path].append(metadata)
                 self._test_dirs.add(os.path.dirname(path))
                 flavor = metadata.get('flavor')
                 self._tests_by_flavor[flavor].add(path)
 
     def tests_with_flavor(self, flavor):
         """Obtain all tests having the specified flavor.