From 7a1c539e399b3bb037b1421f45cecbb6b0c0a596 Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Mon, 18 Mar 2019 16:50:57 +0000 Subject: [PATCH] Bug 1521967 - Part 1: Use MOZ_HOST_BIN to find certutil in `mach raptor-test` for Android. r=rwood Differential Revision: https://phabricator.services.mozilla.com/D17396 --HG-- extra : moz-landing-system : lando --- testing/mozbase/mozproxy/mozproxy/backends/mitm.py | 6 +++++- testing/raptor/mach_commands.py | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/testing/mozbase/mozproxy/mozproxy/backends/mitm.py b/testing/mozbase/mozproxy/mozproxy/backends/mitm.py index 39fcd360de01..b64bdef8530d 100644 --- a/testing/mozbase/mozproxy/mozproxy/backends/mitm.py +++ b/testing/mozbase/mozproxy/mozproxy/backends/mitm.py @@ -354,7 +354,11 @@ class MitmproxyAndroid(Mitmproxy): self.CERTUTIL_SLEEP = 10 if self.config['run_local']: # when running locally, it is found in the Firefox desktop build (..obj../dist/bin) - self.certutil = os.path.join(self.config['obj_path'], 'dist', 'bin') + self.certutil = os.path.join(os.environ['MOZ_HOST_BIN'], 'certutil') + if not (os.path.isfile(self.certutil) and os.access(self.certutil, os.X_OK)): + LOG.critical("Abort: unable to execute certutil: {}".format(self.certutil)) + raise + self.certutil = os.environ['MOZ_HOST_BIN'] os.environ['LD_LIBRARY_PATH'] = self.certutil else: # must download certutil inside hostutils via tooltool; use this manifest: diff --git a/testing/raptor/mach_commands.py b/testing/raptor/mach_commands.py index 4cb3a196488e..2af865486630 100644 --- a/testing/raptor/mach_commands.py +++ b/testing/raptor/mach_commands.py @@ -181,7 +181,8 @@ class MachRaptor(MachCommandBase): if conditions.is_android(build_obj) or kwargs['app'] in firefox_android_browsers: from mozrunner.devices.android_device import verify_android_device from mozdevice import ADBAndroid, ADBHost - if not verify_android_device(build_obj, install=True, app=kwargs['binary']): + if not verify_android_device(build_obj, install=True, app=kwargs['binary'], + xre=True): # Equivalent to 'run_local' = True. return 1 debug_command = '--debug-command'