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

--HG--
extra : rebase_source : 6df25b1dc098b83aa919a482c7ec8d72115b084c
This commit is contained in:
Anjana Vakil 2016-06-27 20:21:31 +02:00
parent 24e5309e4d
commit 72e88b22d6

View File

@ -147,7 +147,10 @@ class MachCommands(MachCommandBase):
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',