From be33077ff595fdb71e26cf575299e9973fe5b8fb Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Fri, 27 Oct 2017 10:07:52 -0700 Subject: [PATCH] Bug 1412356 - Don't invoke client.mk from mobile l10n automation; r=chmanchester The old code was simply running configure and manually invoking some make targets via client.mk. These can both be done via `mach`. As part of the change, the build targets have been consolidated. There is still an abstraction leak here. But at least we aren't using client.mk. MozReview-Commit-ID: 7oMXPWPZS6V --HG-- extra : rebase_source : 6d632dc086d79a17e577da66336c77003d963f67 --- testing/mozharness/scripts/mobile_l10n.py | 28 ++++++++++++----------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/testing/mozharness/scripts/mobile_l10n.py b/testing/mozharness/scripts/mobile_l10n.py index 168a29acf95b..10bda50a8793 100755 --- a/testing/mozharness/scripts/mobile_l10n.py +++ b/testing/mozharness/scripts/mobile_l10n.py @@ -426,26 +426,28 @@ class MobileSingleLocale(MockMixin, LocalesMixin, ReleaseMixin, def _setup_configure(self, buildid=None): dirs = self.query_abs_dirs() env = self.query_repack_env() - make = self.query_exe("make") - if self.run_command_m([make, "-f", "client.mk", "configure"], + + mach = os.path.join(dirs['abs_mozilla_dir'], 'mach') + + if self.run_command_m([sys.executable, mach, 'configure'], cwd=dirs['abs_mozilla_dir'], env=env, error_list=MakefileErrorList): self.fatal("Configure failed!") - # Run 'make export' in objdir/config to get nsinstall - self.run_command_m([make, 'export'], - cwd=os.path.join(dirs['abs_objdir'], 'config'), - env=env, - error_list=MakefileErrorList, - halt_on_failure=True) + # Invoke the build system to get nsinstall and buildid.h. + targets = [ + 'config/export', + 'buildid.h', + ] - # Run 'make buildid.h' in objdir/ to get the buildid.h file - cmd = [make, 'buildid.h'] + # Force the buildid if one is defined. if buildid: - cmd.append('MOZ_BUILD_DATE=%s' % str(buildid)) - self.run_command_m(cmd, - cwd=dirs['abs_objdir'], + env = dict(env) + env['MOZ_BUILD_DATE'] = str(buildid) + + self.run_command_m([sys.executable, mach, 'build'] + targets, + cwd=dirs['abs_mozilla_dir'], env=env, error_list=MakefileErrorList, halt_on_failure=True)