-
Notifications
You must be signed in to change notification settings - Fork 33
tests: refactor folder structure to split on the type of test #599
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
base: main
Are you sure you want to change the base?
Conversation
|
You can find the documentation preview for this PR here. |
516d3cd to
ff674de
Compare
ff674de to
678f78d
Compare
31039b7 to
80c241c
Compare
|
The |
You are correct there is no such split in zephyr, sdk-nrf etc. The reason we want to split it is that it gives an easier overview of the tests we have, e.g. what modules we have unit tests for, and what we have system tests (ztest, pytest ...) for. Also, there might be modules where we have both unit tests and system tests, and it is not very practical putting them in the same location. Of course the testcase.yaml file will have twister pick up the correct tests regardless. Twister can be used to run all the tests. I'm open for other suggestions on how to structure it, though I don't think keeping it as it is is ideal. |
|
I agree with @fundakol on this. To me it is more useful and functional to have tests grouped by the relevant area than by a specific harness (framework) they use. If I am looking for bluetooth related stuff I would prefer to have them all in mutual directory than scattered across multiple places and trying to figure out what is the difference between ztest/console/pytest. |
|
Would it be fine to split just |
I don't think unity and ztest would be the correct terms then, though perhaps |
|
Splitting it to unit/ and system/ seems cleaner ! |
80c241c to
bc61eb9
Compare
|
Split the tests into unit and system instead of based on the test harness. That should allow for tests using multiple harnesses, while keeping a clear distinction of what is unit tested and what is system tested. |
bc61eb9 to
ba2b49c
Compare
CODEOWNERS
Outdated
| /tests/system/subsys/fs/bm_zms/ @nrfconnect/ncs-bm @rghaddab | ||
| /tests/system/subsys/kmu/ @nrfconnect/ncs-eris |
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.
-1 on system subfolder, have it /tests/subsys/X
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.
Other suggestions are welcome. Point is that we want to have one folder with unit tests and one folder with system tests. There will be more system tests to follow, not only in subsys.
Corrected codeowners file alignment.
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.
the unit tests go in /tests/unit the other tests go in /tests just as they do in ncs and zephyr
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.
Agreed, I would suggest we follow the tests/unit/ and tests/ to match NCS and Zephyr
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.
Ok, I was not aware of that pattern in NCS. On a side note, it seems that some cleanup is required in sdk-nrf (search CONFIG_UNITY=y). The tests are not within that folder.
Will update the PR.
ba2b49c to
fa3f0b5
Compare
Place unit tests in unit folder, and system tests in system folder. Signed-off-by: Eivind Jølsgard <[email protected]>
fa3f0b5 to
c15f53e
Compare
Place unit tests in
tests/unit/folder, other tests intests/folder.