forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Portion of zephyr/tests/lib tests #8
Open
tristan-google
wants to merge
42
commits into
yperess:ztest
Choose a base branch
from
tristan-google:honscheid/lib-tests
base: ztest
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Test suites in prior ztest serve no purpose other than logical ordering of tests into a named-group. Move the construct of setup and teardown into the test suite and away from individual tests. Additionally, add the constructs of before/after to the test suites. This model more closely resembels other testing frameworks such as gTest and Junit. 2. Test can be added to a suite by using ZTEST() or ZTEST_F() where _F stands for fixture. In the case where _F is used, the argument `this` will be provided with the type `struct suite_name##_fixture*`. Again, this models other modern testing frameworks and allows the test to directly access the already set up data related to the test suite. 3. Add the concept of test rules (from Junit). Rules are similar to the before/after functions of the test suites but are global and run on all suites. An example of a test rule can be to check that nothing was logged to ERROR. The rule can cause the test to fail if anything was logged to ERROR during an integration test. Another example would be a rule that verifies that tests ran within some defined timeout. Signed-off-by: Yuval Peress <[email protected]>
Note, the test_main function is no longer needed since the default already runs all tests. Signed-off-by: Yuval Peress <[email protected]>
Note this change removes the test_main function since the default already runs all the tests suites with no state. Signed-off-by: Yuval Peress <[email protected]>
Note this change keeps the test_main function since some threading configurations need to run. These could also be done in the setup function for the suite. Signed-off-by: Yuval Peress <[email protected]>
Split the test suite into 2: 1. Default with no changes 2. Adds before/after function to account for 1cpu tests Signed-off-by: Yuval Peress <[email protected]>
Note the main test_main function was kept to allow thread config, though this can also be done in the suite's setup. Signed-off-by: Yuval Peress <[email protected]>
Note this keeps the test_main function for thread access setup, though that could also be done in the suite's setup. Signed-off-by: Yuval Peress <[email protected]>
Convert the tests to use various ZTEST unit test declarations based on the Kconfig CONFIG_USERSPACE. Some tests run in both modes, others only in one. Signed-off-by: Yuval Peress <[email protected]>
Remove test_main in favor of new default one. Signed-off-by: Yuval Peress <[email protected]>
Allow self registering functions which gets rid of the need to include all the functions as externs and have alternate implementations. Signed-off-by: Yuval Peress <[email protected]>
Update to self registering test functions which gets rid of extern inclusion and the need to have different implementations. Signed-off-by: Yuval Peress <[email protected]>
Use the 1CPU test rule and migrate to new APIs for attaching the tests to the suite. Signed-off-by: Yuval Peress <[email protected]>
Create new test suites for 1cpu and normal tests and make use of the setup function hook for the suite. Signed-off-by: Yuval Peress <[email protected]>
Migrate tests to new api and fix mismatching function signature for test_fifo_get_fail. Signed-off-by: Yuval Peress <[email protected]>
Update arm_hardfault_validation to new ztest API. Signed-off-by: Aaron Massey <[email protected]> Change-Id: If6a7d7c0d6e0e65a8f1a1ba434521b33b6874517
Update arm_interrupt tests to new ztest API. Signed-off-by: Aaron Massey <[email protected]> Change-Id: I3570c902f67068505a0031b7890a2b03c36e14d4
Update tests to new ztest API Signed-off-by: Aaron Massey <[email protected]> Change-Id: If51829e0ddb5dfe41061c6ade7dcde875275a214
Update test suite to new ZTEST api. Signed-off-by: Aaron Massey <[email protected]> Change-Id: I15f67e4592e7d1594530adcc9b3528b3778bfab0
Update test to new ZTEST API. Signed-off-by: Aaron Massey <[email protected]> Change-Id: Icb5326bfc7c2e47a0c4e458f7d98273680a14156
Refactor tests to new ZTEST api. Signed-off-by: Aaron Massey <[email protected]> Change-Id: I18451cbcb1d08777b6a0658e9c79e0fcf5238561
Refactor tests to use new ZTEST apis. Signed-off-by: Aaron Massey <[email protected]> Change-Id: If388fddc2d75b24ef58eb85f0925648e40bd5667
Refactor to use new ZTEST apis. Signed-off-by: Aaron Massey <[email protected]> Change-Id: Ibc37d835ed7496da8e355052c0982aa1ff2c8480
Refactor tests to use new ZTEST apis. Signed-off-by: Aaron Massey <[email protected]> Change-Id: Iae09c675d7ed6de201d0e85fc6a061bbe4c129e1
Refactor tests to use the new ZTEST api, removing now unnecessary #else. Signed-off-by: Aaron Massey <[email protected]> Change-Id: I828874335556041b3f27e1c89be561c3c71def01
Refactor tests to use new ZTEST APIs. Signed-off-by: Aaron Massey <[email protected]> Change-Id: I2d9343e219cd37ba3a2f4bff3676f9b9a2100e86
Updates tests to use the new ZTEST APIs Signed-off-by: Aaron Massey <[email protected]> Change-Id: Ic85339dabbb508ce2e62e6eed60e24f2925271f6
Refactor tests to use new ZTEST APIs. Signed-off-by: Aaron Massey <[email protected]> Change-Id: I4b614ba1add3bc374f7a2f00f14be69717df70b5
Update tests to use new ZTEST APIs. Signed-off-by: Aaron Massey <[email protected]> Change-Id: Ib50f6e165986fe77a9d2cc4c6caed926c4936471
Update tests to use the new ZTEST APIs. Signed-off-by: Aaron Massey <[email protected]> Change-Id: I05f666e6a77d2b886773138666f01fc507a15038
Update tests to use the new ZTEST API. Signed-off-by: Aaron Massey <[email protected]> Change-Id: Idbfdf87c91628b9381eccf6e0ff689db9fc177e2
Updates tests to use the new ZTEST APIs Signed-off-by: Aaron Massey <[email protected]> Change-Id: Ieae3df129ff8a24112e0fec4b708bcf49880649a
Updates tests to use the new ZTEST APIs Signed-off-by: Aaron Massey <[email protected]> Change-Id: If1e98180394d7f5041be93a60dcd8af9ed298349
yperess
force-pushed
the
ztest
branch
9 times, most recently
from
December 9, 2021 06:18
afc1a81
to
2cd4645
Compare
yperess
force-pushed
the
ztest
branch
3 times, most recently
from
December 23, 2021 06:03
5a65977
to
450038e
Compare
yperess
force-pushed
the
ztest
branch
3 times, most recently
from
December 31, 2021 05:16
9efd30e
to
ce893e5
Compare
yperess
force-pushed
the
ztest
branch
4 times, most recently
from
January 25, 2022 17:58
f34f425
to
236fe51
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Up to lib/cmsis_dsp/fastmath