Skip to content
Snippets Groups Projects
Verified Commit 1e57cc47 authored by Varac's avatar Varac
Browse files

Use --behave-param instead of --behave-opts

parent e245ed8f
No related branches found
No related tags found
No related merge requests found
......@@ -182,8 +182,10 @@ def main(): # pylint: disable=too-many-statements,too-many-branches,too-many-lo
action='store_true',
help=('Run behave in headless mode'))
test_parser.add_argument(
'--behave-opts',
nargs='+',
'--behave-param',
metavar=['PARAM[=VALUE]'],
action='append',
nargs=1,
default=[],
help=('Pass additional behave options (like "-D browser=firefox"'))
......@@ -331,9 +333,14 @@ def test(clus, args):
for tag in args.behave_tags:
log.info(command)
command.append('-t {tag}'.format(tag=tag))
for opt in args.behave_opts:
log.info(command)
command.append(opt)
if args.behave_param:
for param in args.behave_param:
if len(param) > 1:
log.warning('More than 1 parameter. Ignoring the rest! '
'Use --behave-param several times to supply '
'more than 1 parameter')
param = param[0]
command.append(param)
log.info('Running behave command %s', command)
return_code = behave_main(command)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment