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
--- 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())