Bug 1244446 - Run automation build steps before postflight_all. r=gps,r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 01 Jun 2016 07:22:49 +0900
changeset 342850 aa8cdba912d328070bf56330a3abe5b86e9cd136
parent 342849 e1bd07ec0b5b13ededa511dda2872de01df29bb2
child 342851 051b7c10b6175d6aba58af013f8e4e289c6d05d7
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps, ted
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 1244446 - Run automation build steps before postflight_all. r=gps,r=ted Killing the sccache background daemon is part of postflight_all, but in the current setup, postflight_all happens at the end of a "normal" build, but we run automation build steps after that. What happens then is that more compilations happen (gtests), which start sccache again, but there's nothing to kill sccache again once this is all done. Now that the OSX universal builds postflight is gone, it is not necessary for postflight_all to happen before the automation build steps. So ensure postflight_all scripts happen last. The downside of this change is that this now prevents sccache.log from being uploaded, but we should probably send processed data to the graph server instead.
--- a/client.mk
+++ b/client.mk
@@ -427,16 +427,25 @@ ifdef MOZ_POSTFLIGHT
 # Postflight, after building all projects
+$(if $(MOZ_PGO),profiledbuild,realbuild)::
+# Only run the automation/build target for the first project.
+# (i.e. first platform of universal builds)
+	$(MAKE) -f $(TOPSRCDIR)/client.mk automation/build $(addprefix MOZ_CURRENT_PROJECT=,$(firstword $(MOZ_BUILD_PROJECTS)))
 realbuild postflight_all::
 # Don't run postflight_all for individual projects in multi-project builds
 # (when MOZ_CURRENT_PROJECT is set.)
 # Building a single project, OBJDIR is usable.
 	set -e; \
 	for mkfile in $(MOZ_POSTFLIGHT_ALL); do \
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -429,37 +429,16 @@ class Build(MachCommandBase):
                     self.log(logging.DEBUG, 'artifact',
                              {}, "Not running |mach artifact install| -- it will be run by client.mk.")
                 status = self._run_make(srcdir=True, filename='client.mk',
                     line_handler=output.on_line, log=False, print_directory=False,
                     allow_parallel=False, ensure_exit_code=False, num_jobs=jobs,
                     silent=not verbose)
-                make_extra = self.mozconfig['make_extra'] or []
-                make_extra = dict(m.split('=', 1) for m in make_extra)
-                # For universal builds, we need to run the automation steps in
-                # the first architecture from MOZ_BUILD_PROJECTS
-                projects = make_extra.get('MOZ_BUILD_PROJECTS')
-                append_env = None
-                if projects:
-                    project = projects.split()[0]
-                    append_env = {b'MOZ_CURRENT_PROJECT': project.encode('utf-8')}
-                    subdir = os.path.join(self.topobjdir, project)
-                else:
-                    subdir = self.topobjdir
-                moz_automation = os.getenv('MOZ_AUTOMATION') or make_extra.get('export MOZ_AUTOMATION', None)
-                if moz_automation and status == 0:
-                    status = self._run_make(target='automation/build', directory=subdir,
-                        line_handler=output.on_line, log=False, print_directory=False,
-                        ensure_exit_code=False, num_jobs=jobs, silent=not verbose,
-                        append_env=append_env
-                    )
                 self.log(logging.WARNING, 'warning_summary',
                     {'count': len(monitor.warnings_database)},
                     '{count} compiler warnings present.')
         high_finder, finder_percent = monitor.have_high_finder_usage()
         if high_finder: