Bug 1282488 - Warn about unused `--binary` option in `mach marionette-test`; r?maja_zf
If a user passes the `--binary` option to the `marionette-test` mach command,
instead of silently ignoring the given path in favor of `self.get_binary_path`,
print a warning message and the path to the binary being used.
MozReview-Commit-ID: AVbpExDlaql
--- a/testing/marionette/mach_commands.py
+++ b/testing/marionette/mach_commands.py
@@ -142,17 +142,20 @@ 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']
- kwargs['binary'] = self.get_binary_path('app')
+ bin_path = self.get_binary_path('app')
+ if 'binary' in kwargs:
+ print "Warning: ignoring '--binary' option, using binary at " + bin_path
+ kwargs['binary'] = bin_path
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):