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

Improved CLI configuration options #143

Open
davidlenfesty opened this issue May 27, 2021 · 2 comments
Open

Improved CLI configuration options #143

davidlenfesty opened this issue May 27, 2021 · 2 comments

Comments

@davidlenfesty
Copy link

I'm trying to integrate cocotb-test into a verification GUI I'm writing, and would like better options for runtime management of tests.

Specifically, I need to support two use cases:

  • When a testcase fails, I want to automatically re-run it with the same options (i.e. the same seed) and with tracing enabled, so I can save this trace for later analysis.
  • I need to run coverage and regression separately from within my tool.

I'm not sure what this looks like. I'm leaning towards environment variables overriding or adding arguments to the various cocotb options, similar to what WAVES does, but I'm not sure if that's the preferred direction. FWIW, I only need to access RANDOM_SEED, WAVES, and EXTRA_ARGS, for this use case.

I do know how I would go about to add some external tooling to pull in extra environment variables, however that would be a bit of a usability issue, as if a test function wasn't properly annotated it would show up in the list of tests, but wouldn't function in the expected ways. Also it would require changes to existing tests, which is not preferred.

@themperek
Copy link
Owner

I do not think I know what you are training to do. Something like this: https://github.com/tfio/pytest-gui

Not sure if you develop your own runtime 1) or you want to use cocotb-test 2)?

For option 1) you need to use the environment internally because this is what cocotb uses and just add integration https://docs.cocotb.org/en/stable/custom_flows.html. How this works for the user is up to you.

For option 2) I would not mind adding control for RANDOM_SEED and EXTRA_ARGS similar to WAVES.

@davidlenfesty
Copy link
Author

Yes, something similar to that but geared towards HDL, largely with the two extra use cases I mentioned.

I would like to use cocotb-test for this (option 2), so that we also get the extra infrastructure from pytest. Adding RANDOM_SEED and EXTRA_ARGS would be perfect for this, thank you!

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