Bug 1295492 - Add support for --binary argument to Marionette mach command. r?maja_zf
MozReview-Commit-ID: 6tru2Ms135j
--- a/testing/marionette/mach_commands.py
+++ b/testing/marionette/mach_commands.py
@@ -146,29 +146,27 @@ class MachCommands(MachCommandBase):
)
def run_marionette_test(self, tests, **kwargs):
if 'test_objects' in kwargs:
tests = []
for obj in kwargs['test_objects']:
tests.append(obj['file_relpath'])
del kwargs['test_objects']
- if conditions.is_firefox(self):
- bin_path = self.get_binary_path('app')
- if kwargs.get('binary') is not None:
- print "Warning: ignoring '--binary' option, using binary at " + bin_path
- kwargs['binary'] = bin_path
+ if not kwargs.get('binary') and conditions.is_firefox(self):
+ kwargs['binary'] = self.get_binary_path('app')
return run_marionette(tests, topsrcdir=self.topsrcdir, **kwargs)
@Command('session-test', category='testing',
description='Run a Session test (Check Telemetry using marionette).',
conditions=[conditions.is_firefox],
parser=setup_session_argument_parser,
)
def run_session_test(self, tests, **kwargs):
if 'test_objects' in kwargs:
tests = []
for obj in kwargs['test_objects']:
tests.append(obj['file_relpath'])
del kwargs['test_objects']
- kwargs['binary'] = self.get_binary_path('app')
- return run_session(tests, topsrcdir=self.topsrcdir, **kwargs)
\ No newline at end of file
+ if not kwargs.get('binary') and conditions.is_firefox(self):
+ kwargs['binary'] = self.get_binary_path('app')
+ return run_session(tests, topsrcdir=self.topsrcdir, **kwargs)