Bug 1317101 - Part 8a: Read defaults from ancestor manifests when processing test metadata. r=chmanchester
☠☠ backed out by ed48815cbe18 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Sat, 12 Nov 2016 18:30:47 -0800
changeset 322835 e06d269a5d4f35b608b5bc7f1c61e875f2322b45
parent 322834 1e1bfb578dcd24433d43fb67cc1f75e87ba48d21
child 322836 a8cdc81cdcce558592d01d3cc6d0ee66269f1077
push id83985
push usermaglione.k@gmail.com
push dateWed, 16 Nov 2016 21:47:37 +0000
treeherdermozilla-inbound@61f8a4084bbd [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.