Bug 1412356 - Don't invoke client.mk from mobile l10n automation; r?build
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
--- 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')