Bug 1478165: Ensure that a talos suite config's talos_options do not override existing options supplied via the command line; r=rwood

--HG--
extra : rebase_source : 0a146ec27117028343ddb89df34f1c08d410b984
This commit is contained in:
Aaron Klotz 2018-08-07 10:25:47 -06:00
Родитель 8fe5a35999
Коммит 2de70579a0
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -332,7 +332,10 @@ def get_config(argv=None):
except KeyError:
raise ConfigurationError('No such suite: %r' % cli_opts.suite)
argv += ['-a', ':'.join(suite_conf['tests'])]
argv += suite_conf.get('talos_options', [])
# talos_options in the suite config should not override command line
# options, so we prepend argv with talos_options so that, when parsed,
# the command line options will clobber the suite config options.
argv = suite_conf.get('talos_options', []) + argv
# args needs to be reparsed now
elif not cli_opts.activeTests:
raise ConfigurationError('--activeTests or --suite required!')