Bug 1362148 - Call generate_build_props() as part of build(); r=ted draft
authorGregory Szorc <gps@mozilla.com>
Thu, 04 May 2017 17:24:06 -0700
changeset 577089 5aedf1871d44e141de8373264ac0a84221abd9c4
parent 576982 1e2fe13035e13b7b4001ade3b48f226957cef5fc
child 577090 c66b8ab98a720404fa42cc074a44343a54270bba
push id58600
push userbmo:gps@mozilla.com
push dateFri, 12 May 2017 20:26:18 +0000
reviewersted
bugs1362148
milestone55.0a1
Bug 1362148 - Call generate_build_props() as part of build(); r=ted Previously, this ran during postflight_build(). The magic postflight_* methods are called automagically by BaseScript.run_action() and are only called if the main action method didn't raise. So there should be no functional difference with this commit. The reason I changed this is that a subsequent commit will perform metrics generation from build() and without the build properties file loaded, at least the OS X 64 opt buildbot build doesn't have packageFilename defines, which breaks metrics collection. MozReview-Commit-ID: 54ftuQqGKVi
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -1644,16 +1644,18 @@ or run without that action (ie: --no-{ac
         if return_code:
             self.return_code = self.worst_level(
                 EXIT_STATUS_DICT[TBPL_FAILURE],  self.return_code,
                 AUTOMATION_EXIT_CODES[::-1]
             )
             self.fatal("'mach build' did not run successfully. Please check "
                        "log for errors.")
 
+        self.generate_build_props(console_output=True, halt_on_failure=True)
+
     def multi_l10n(self):
         if not self.query_is_nightly():
             self.info("Not a nightly build, skipping multi l10n.")
             return
         self._initialize_taskcluster()
 
         dirs = self.query_abs_dirs()
         base_work_dir = dirs['base_work_dir']
@@ -1737,20 +1739,18 @@ or run without that action (ie: --no-{ac
             upload_files_cmd,
             cwd=objdir,
         )
         files = shlex.split(output)
         abs_files = [os.path.abspath(os.path.join(objdir, f)) for f in files]
         self._taskcluster_upload(abs_files, self.routes_json['l10n'],
                                  locale='multi')
 
-    def postflight_build(self, console_output=True):
+    def postflight_build(self):
         """grabs properties from post build and calls ccache -s"""
-        self.generate_build_props(console_output=console_output,
-                                  halt_on_failure=True)
         if self.config.get('enable_ccache'):
             self._ccache_s()
 
         # A list of argument lists.  Better names gratefully accepted!
         mach_commands = self.config.get('postflight_build_mach_commands', [])
         for mach_command in mach_commands:
             self._execute_postflight_build_mach_command(mach_command)