Bug 1412356 - Don't invoke client.mk from mobile l10n automation; r=chmanchester
authorGregory Szorc <gps@mozilla.com>
Fri, 27 Oct 2017 10:07:52 -0700
changeset 389716 6b2e91dc30b0658f58b3f7dc2e525152f5486a5b
parent 389715 b558ad2372bf606da4f1e06f92be348cb7fbc78a
child 389717 c6f61e9946678bf6c1d77b212d71595d0bb016c3
push id32793
push userapavel@mozilla.com
push dateThu, 02 Nov 2017 09:38:11 +0000
treeherdermozilla-central@dfa093fe1e15 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1412356
milestone58.0a1
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 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
testing/mozharness/scripts/mobile_l10n.py
--- a/testing/mozharness/scripts/mobile_l10n.py
+++ b/testing/mozharness/scripts/mobile_l10n.py
@@ -421,36 +421,38 @@ class MobileSingleLocale(MockMixin, Loca
     def clone_locales(self):
         self.pull_locale_source()
 
     # list_locales() is defined in LocalesMixin.
 
     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)
 
     def setup(self):
         c = self.config
         dirs = self.query_abs_dirs()
         mozconfig_path = os.path.join(dirs['abs_mozilla_dir'], '.mozconfig')