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
tests/unittests: Move large unittests to individual tests #10187
Comments
good idea, but I would rephrase to: move out all unittests that require external packages. |
move package tests from unittests, which are
|
My goal here is shrink the size of the unittest binary a bit. Removing all packages from the unittests helps a lot and I agree that they should not be in the unittests. However there are a few tests in there that are also large enough that they in my opinion qualify for having a separate test. |
at #10183 we reached the conclusion that the crypto tests only get to run on native as not to increase the load on the hardware CI units too much. Those tests take around 1-2mins per crypto tests on a samr21-xpro and could significantly impact the runtime of the CI. |
yep, maybe we should discuss (again) a general split of the (unit)tests by main-folder, i.e., |
The current set of open PRs shaves approximately 70KB of the unittest binary |
I paused reviewing the tests splits since the feature freeze. I have less time and I think it would be easier to merge them after the release in case we need to provide bug fix and backports. |
tests-hashes overflows the stack on frdm-kw41z when running the full unit tests suite.
|
@gebart Thanks for reporting. I think we split of most (probably all) of the tests that require and configured increased stack size. So these tests that do require increased stack size, but never configured it trigger a few errors. |
I did another test with increased stack size and measured the stack usage after all tests had run. On frdm-kw41z, the full unittests suite required 1652 bytes at most. I did not investigate where this is used, but I assume that it is in tests-hashes because of the stack overflow crash I logged earlier. |
Note, we will need to update the |
I noticed it would be also nice to move |
I am listing the boards that can now be re-enabled. |
@miri64 I was about to move Also as we were talking about it last time, the
|
I have to look at it again to be 100% sure, but I think the TL;DR:
Then I guess most memory (also in other tests) can be saved by making those constants public. |
I just noticed a funny thing. All the unittests tests, except for |
Mhhh... I did that, but somehow it grew instead of shrinking: On current master (741d543):
On my branch:
|
I tried it too and when I changed it in one file, it shrinked it, but the other made it grow too :/ Splitting it would solve the issue for |
Ok, but those should be distinct from |
No idea about what |
ADT = Abstract Data Type ;-) |
I propose breaking out a number of large tests from the unittests to their own test. This to decrease the flash size of the full unittest binary a bit.
Tests:
Flash sizes as mentioned below are based on the size of the required flash of the package itself, or when it is not a package, the flash required for the test itself. All flash sizes are measured for the nrf52840dk board.
Optionally:
DISABLE_
tests variables.Final task
LARGE_STACK_TESTS
fromunittests
tests/unittests: remove unused LARGE_STACK_TESTS #11601BOARD_INSUFFICIENT_MEMORY
Packages that would still remain if all these tests are moved outside are cn-cbor at almost 2KB and heatshrink at 1.5KBremovedThe text was updated successfully, but these errors were encountered: