Bug 1364196 - Ensure perfherder_extra_options always present; r?ted draft
authorGregory Szorc <gps@mozilla.com>
Thu, 11 May 2017 13:28:38 -0700
changeset 576550 dba3db2bd18345dc54a2585aaa71a28520c870ae
parent 576549 d8a4ff182660094be94722439fbbc8bc7469c132
child 628230 2696bb96de2cf3b64fe39bdb99b1e8523cc68f73
push id58399
push usergszorc@mozilla.com
push dateThu, 11 May 2017 20:28:55 +0000
reviewersted
bugs1364196
milestone55.0a1
Bug 1364196 - Ensure perfherder_extra_options always present; r?ted Previously, only the mach resource metrics consulted perfherder_extra_options. This resulted in many data sets tracking values for distinct build configurations. MozReview-Commit-ID: 6t5UaUUvHxT
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -2032,16 +2032,22 @@ or run without that action (ie: --no-{ac
                 'subtests': [],
             })
 
         build_metrics = self._load_build_resources()
         if build_metrics:
             perfherder_data['suites'].append(build_metrics)
         perfherder_data['suites'].extend(self._load_sccache_stats())
 
+        # Ensure all extra options for this configuration are present.
+        for opt in self.config.get('perfherder_extra_options', []):
+            for suite in perfherder_data['suites']:
+                if opt not in suite.get('extraOptions', []):
+                    suite.setdefault('extraOptions', []).append(opt)
+
         if self.query_is_nightly():
             for suite in perfherder_data['suites']:
                 suite.setdefault('extraOptions', []).insert(0, 'nightly')
 
         if perfherder_data["suites"]:
             self.info('PERFHERDER_DATA: %s' % json.dumps(perfherder_data))
 
     def sendchange(self):