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

Add feature to dump information about tests #3882

Open
ktbarrett opened this issue May 3, 2024 · 0 comments
Open

Add feature to dump information about tests #3882

ktbarrett opened this issue May 3, 2024 · 0 comments
Labels
type:feature new or enhanced functionality

Comments

@ktbarrett
Copy link
Member

ktbarrett commented May 3, 2024

Many users have (ab)used the previous detail that tests in MODULEs were Test objects that they could grab to discover tests themselves. How tests are registered was changed and their code is broken. Perhaps it's possible we can provide this functionality rather than have users depend upon implementation details and homegrown test discovery routines.

Given a MODULE and TESTCASE/COCOTB_TEST_FILTER we can dump to a JSON file the names of the tests, TestFactory/parameterize arguments, docstrings, expect_fail, timeouts, skip, whether the test would be run or not, etc. etc. We could literally serialize the Test objects used by the regression manager that are currently saved into the __cocotb_tests__ attribute in each MODULE.

This would be formatted as a different entry point that would not run the scheduler. The switch would be controlled via environment variable; maybe something like COCOTB_LIST_TESTS or COCOTB_DRY_RUN. Loading the simulator is necessary as it's common to reflect upon the design to parameterize tests.

@ktbarrett ktbarrett added the type:feature new or enhanced functionality label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature new or enhanced functionality
Projects
None yet
Development

No branches or pull requests

1 participant