From 2de70579a092f9337cabbf1789288b332ca92c1f Mon Sep 17 00:00:00 2001 From: Aaron Klotz Date: Tue, 7 Aug 2018 10:25:47 -0600 Subject: [PATCH] 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 --- testing/talos/talos/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testing/talos/talos/config.py b/testing/talos/talos/config.py index 14c0c8a768d9..1998d6e4e9a5 100644 --- a/testing/talos/talos/config.py +++ b/testing/talos/talos/config.py @@ -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!')