Commit defd76ff authored by Martin Jeřábek's avatar Martin Jeřábek

testfw: add `strict` option to yaml config

Analogue of --strict/--no-strict.
Closes #269
parent f9bb7051
Pipeline #6750 passed with stage
in 42 seconds
......@@ -71,15 +71,19 @@ def create():
# NOTE: I'd like to use [True, False, None] for strict, but click is damn
# stubborn about interpreting None as False
@click.argument('config', type=click.Path())
@click.argument('vunit_args', nargs=-1)
@click.option('--strict/--no-strict', default=True,
@click.option('--__strict-from-config', 'strict', flag_value=-1, default=True, hidden=True)
@click.option('--strict', 'strict', flag_value=1,
help='Return non-zero if an unconfigured test was found.')
@click.option('--no-strict', 'strict', flag_value=0)
@click.option('--create-ghws/--no-create-ghws', default=False,
help='Only elaborate and create basic GHW files necessary for converting TCL layout files to GTKW files for gtkwave..')
def test(obj, config, strict, create_ghws, vunit_args):
def test(obj, *, config, strict, create_ghws, vunit_args):
"""Run the tests. Configuration is passed in YAML config file.
You mas pass arguments directly to VUnit by appending them at the command end.
......@@ -110,6 +114,13 @@ def test(obj, config, strict, create_ghws, vunit_args):
if 'strict' in config:
if strict == -1:
strict = config['strict']
if strict == -1:
strict = 0
strict = bool(strict)
if create_ghws:
# discard the passed vunit_args, it does only evil
vunit_args = ['--elaborate']
strict: false # unconfigured tests reported as error; defaults to true
_default: &default
log_level: info
error_tolerance: 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment