-
Notifications
You must be signed in to change notification settings - Fork 16
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 pytest - step 2 #554
Add pytest - step 2 #554
Conversation
|
…ocks into lekcyjna/add-pytest-2
|
…ocks into lekcyjna/add-pytest-2
@@ -0,0 +1,127 @@ | |||
from .memory import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the file rename?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be found during discovery procedure. Every file with tests should have either test_
or _test
by default. test.py
is not correct name in default configuration.
https://doc.pytest.org/en/latest/explanation/goodpractices.html#conventions-for-python-test-discovery
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should separate 'regression' as [external tests that may be run with verilator], apart from [the riscv-tests
suite].
In this file MMIO
and rv32uc-rvc
are both very riscv-test
specific, but it also contains regression_body_with_cocotb
, verilate_model
that seem like they are generic for all verilator regeression test concept.
It was also a problem with previous solution, so maybe it is a good time to separate and generalize it now? Or am I missing something and those would not be useful in more generic context?
Also I think that in test/regression/conftest.py
, test collecting functions should be named more to reflect that they are configuring riscv-tests
suite and not regression tests in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a good point, but I would prefer to do that in separate PR (the one in which multithreading will be added to riscof tests), because regression_body_with_cocotb
have some hardcoded values specific for riscv-tests
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me, but please don't forget to also clarify the usage of 'regression' term in all places in that PR :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only some typos and description suggestions.
Co-authored-by: piotro888 <[email protected]>
Next step of adding pytest.