I thought that based on previous discussion, including the runner_cfg generic would be enough for VUnit to pickup a testbench to run tests on. It appears that both the entity and filename of the testbench must also meet the following rules:
def tb_filter(entity):
"""
Filters entities with both file name and entity name matching tb_* or *_tb.
"""
# Above docstring can show up in ui.py warnings
file_ok = basename(entity.file_name).startswith("tb_") or splitext(basename(entity.file_name))[0].endswith("_tb")
entity_ok = entity.name.startswith("tb_") or entity.name.endswith("_tb")
if file_ok and entity_ok:
return True
return False
This was a problem for me because a testbench was named myblock_TB.vhd instead of myblock_tb.vhd.
I suggest that the scanner allow any case when filtering on tb_* or *_tb.
It might be worth considering bypassing the naming rules if the entity contains the runner_cfg generic.
Regardless, a note should also be added to the documentation that the testbench files and entities must be named in a specific way in order for the scanner to pick them up.
I thought that based on previous discussion, including the
runner_cfggeneric would be enough for VUnit to pickup a testbench to run tests on. It appears that both the entity and filename of the testbench must also meet the following rules:This was a problem for me because a testbench was named
myblock_TB.vhdinstead ofmyblock_tb.vhd.I suggest that the scanner allow any case when filtering on tb_* or *_tb.
It might be worth considering bypassing the naming rules if the entity contains the
runner_cfggeneric.Regardless, a note should also be added to the documentation that the testbench files and entities must be named in a specific way in order for the scanner to pick them up.