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 589309 c3c28426468474a7aa51a10787d01ebbba10dd82
parent 589301 2c6289f56812c30254acfdddabcfec1e149c0336
child 589310 80cf1917a0b910e0867c7707091a5c67c42e519c
push id62318
push userbmo:gps@mozilla.com
push dateTue, 06 Jun 2017 01:11:27 +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
@@ -1639,16 +1639,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']
@@ -1732,20 +1734,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)
         # 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)
 
     def _execute_postflight_build_mach_command(self, mach_command_args):
         env = self.query_build_env()
         env.update(self.query_mach_build_env())