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

ghdl code coverage in multi tests #437

Open
qarlosalberto opened this issue Jan 17, 2019 · 5 comments
Open

ghdl code coverage in multi tests #437

qarlosalberto opened this issue Jan 17, 2019 · 5 comments

Comments

@qarlosalberto
Copy link

Hello,

I am trying to do code coverage with multiple generated tests with ghdl (gcc backend). I have a problem with gcov outputs. One test overwrites the gcov outputs of another.

I have found a solution, change the environment variable for each test. It is possible?

https://gcc.gnu.org/onlinedocs/gcc/Cross-profiling.html

@qarlosalberto
Copy link
Author

I have the same problem with the psl report. One test overwritten the report of another. Would it be possible to generate the report in the folder of each test?

This is because the ghdl outputs are created in the run.py folder, no in /vunit_out/test_output/TEST

@kraigher
Copy link
Collaborator

Each test run is assigned its own output path even if it is a generated test. In the cases you mention GHDL might need an extra flag to make the coverage and psl artifacts end up in the output path. Alternatively running the GHDL command with the output path as the working directory. The relevant file is ghdl_interface. py if you want to make a change.

@qarlosalberto
Copy link
Author

Thanks for answering.

For psl report I have ui.set_sim_option("ghdl.sim_flags" , ["--psl-report=psl_coverage.json"])
How can I pass the output path?

@kraigher
Copy link
Collaborator

You cannot access the output path and use it in a sim option currently.

@qarlosalberto
Copy link
Author

It could be a nice feature.
Could I add new features to ghdl interface? Should I create a new issue to discuss it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants