Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runner_cfg not recognized when preceded by optional "constant" keyword #852

Closed
tristanitschner opened this issue Jul 13, 2022 · 1 comment · Fixed by #854
Closed

runner_cfg not recognized when preceded by optional "constant" keyword #852

tristanitschner opened this issue Jul 13, 2022 · 1 comment · Fixed by #854
Labels
Milestone

Comments

@tristanitschner
Copy link

Example: (shamelessly copied and adjusted from the provided examples)

library vunit_lib;
context vunit_lib.vunit_context;

entity tb_minimal is
  generic (constant runner_cfg : string := runner_cfg_default);
end entity;

architecture tb of tb_minimal is
begin
  test_runner : process
  begin
    test_runner_setup(runner, runner_cfg);
    check_equal(to_string(17), "17");
    test_runner_cleanup(runner);
  end process;
end architecture;

run.py:

from pathlib import Path
from vunit import VUnit

ROOT = Path(__file__).parent

VU = VUnit.from_argv()

LIB = VU.add_library("lib")
LIB.add_source_files(ROOT / "*.vhd")

VU.main()

Command used:

./run.py

Result:

WARNING - Entity tb_minimal matches testbench name regex ^(tb_.*)|(.*_tb)$ but has no generic runner_cfg and will therefore not be run.
in file /home/git/vunit/examples/vhdl/my_run/tb_minimal.vhd
WARNING - Found no test benches using current filter rule:

    Filters entities and modules that have a runner_cfg generic/parameter

    Gives warning when design_unit matches tb_* or *_tb without having a runner_cfg
    Gives warning when a design_unit has  a runner_cfg but the name does not match tb_* or *_tb
    
Re-compile not needed

No tests were run!

Expected result:
Per § 6.5.2 and section 6.5.6.1 of the VHDL 2008 LRM the constant keyword is optional in an constant interface declaration list of which a generic clause may be composed and thus VUnit should recognize it.

@LarsAsplund
Copy link
Collaborator

@tristanitschner This should have been fixed now. Give it a try.

@eine eine added the Parsing label Jul 20, 2022
@eine eine added this to the v4.7.0 milestone Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants