Bug 1300163 - Reuse the 'e10s' value from the mozharness config on interactive loaners, r?armenzg
I noticed that if you request a loaner for a non-e10s job then run mach, it will be run with e10s
enabled. The mach command should accurately reflect the type of job that got requested. This patch
grabs the 'e10s' argument from the mozharness localconfig.json and uses that.
MozReview-Commit-ID: 4lsKGpizfH7
--- a/layout/tools/reftest/mach_test_package_commands.py
+++ b/layout/tools/reftest/mach_test_package_commands.py
@@ -10,16 +10,17 @@ from functools import partial
from mach.decorators import (
CommandProvider,
Command,
)
def run_reftest(context, **kwargs):
kwargs['app'] = kwargs['app'] or context.firefox_bin
+ kwargs['e10s'] = context.mozharness_config.get('e10s', kwargs['e10s'])
kwargs['certPath'] = context.certs_dir
kwargs['utilityPath'] = context.bin_dir
kwargs['extraProfileFiles'].append(os.path.join(context.bin_dir, 'plugins'))
if not kwargs['tests']:
kwargs['tests'] = [os.path.join('layout', 'reftests', 'reftest.list')]
test_root = os.path.join(context.package_root, 'reftest', 'tests')
--- a/testing/marionette/mach_test_package_commands.py
+++ b/testing/marionette/mach_test_package_commands.py
@@ -20,16 +20,17 @@ def run_marionette(context, **kwargs):
MarionetteTestRunner,
MarionetteHarness
)
from mozlog.structured import commandline
args = argparse.Namespace(**kwargs)
args.binary = args.binary or context.firefox_bin
+ args.e10s = context.mozharness_config.get('e10s', args.e10s)
test_root = os.path.join(context.package_root, 'marionette', 'tests')
if not args.tests:
args.tests = [os.path.join(test_root, 'testing', 'marionette', 'harness',
'marionette', 'tests', 'unit-tests.ini')]
normalize = partial(context.normalize_test_path, test_root)
args.tests = map(normalize, args.tests)
--- a/testing/mochitest/mach_test_package_commands.py
+++ b/testing/mochitest/mach_test_package_commands.py
@@ -13,16 +13,17 @@ from mach.decorators import (
Command,
)
parser = None
def run_mochitest(context, **kwargs):
args = Namespace(**kwargs)
+ args.e10s = context.mozharness_config.get('e10s', args.e10s)
args.certPath = context.certs_dir
if args.test_paths:
test_root = os.path.join(context.package_root, 'mochitest', 'tests')
normalize = partial(context.normalize_test_path, test_root)
args.test_paths = map(normalize, args.test_paths)
return run_mochitest_desktop(context, args)
--- a/testing/xpcshell/mach_test_package_commands.py
+++ b/testing/xpcshell/mach_test_package_commands.py
@@ -17,16 +17,17 @@ from mach.decorators import (
CommandProvider,
Command,
)
def run_xpcshell(context, **kwargs):
args = Namespace(**kwargs)
args.appPath = args.appPath or os.path.dirname(context.firefox_bin)
+ args.e10s = context.mozharness_config.get('e10s', args.e10s)
args.utility_path = context.bin_dir
args.testingModulesDir = context.modules_dir
if not args.xpcshell:
args.xpcshell = os.path.join(args.appPath, 'xpcshell')
if not args.pluginsPath:
for path in context.ancestors(args.appPath, depth=2):