Bug 1221187: testing/marionette/client: Explicitly define --version flag; r=automatedtester

Passing the version keyword to argparse's constructor implicitly adds
-v and --version flags that conflicts with the -v/--verbose flag that
is added in BaseMarionetteArguments.

This removes -v as an alias to --version, which unbreaks testing on try
because it uses runtests.py.

It's perhaps worth mentioning that try uses runtests.py because it does
not (yet) have a full checkout of the source when it runs the tests.

--HG--
extra : rebase_source : 39ce70480c06268c9c7d49ef707514c817dbf922
This commit is contained in:
Andreas Tolfsen 2016-01-06 16:53:35 +00:00
Родитель 522c335953
Коммит 0ecfbbcd7b
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -38,16 +38,16 @@ class MarionetteHarness(object):
self.args = args or self.parse_args()
def parse_args(self, logger_defaults=None):
parser = self._parser_class(
usage='%(prog)s [options] test_file_or_dir <test_file_or_dir> ...',
parser = self._parser_class(usage='%(prog)s [options] test_file_or_dir <test_file_or_dir> ...')
parser.add_argument('--version', action='version',
help="Show version information.",
version="%(prog)s {version}"
" (using marionette-driver: {driver_version}, "
"marionette-transport: {transport_version})".format(
version=__version__,
driver_version=driver_version,
transport_version=transport_version
)
)
))
mozlog.commandline.add_logging_group(parser)
args = parser.parse_args()
parser.verify_usage(args)