You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Many users have (ab)used the previous detail that tests in
MODULE
s wereTest
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
andTESTCASE
/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 theTest
objects used by the regression manager that are currently saved into the__cocotb_tests__
attribute in eachMODULE
.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
orCOCOTB_DRY_RUN
. Loading the simulator is necessary as it's common to reflect upon the design to parameterize tests.The text was updated successfully, but these errors were encountered: