This website requires JavaScript.
Explore
Help
Sign In
OrgZephyr
/
zephyr
mirror of
https://github.com/zephyrproject-rtos/zephyr.git
Watch
1
Star
0
Fork
You've already forked zephyr
0
Code
Issues
Releases
Wiki
Activity
48c21fab93
zephyr
/
samples
/
subsys
/
testsuite
/
pytest
/
prj.conf
4 lines
66 B
Plaintext
Raw
Normal View
History
Unescape
Escape
tests: pytest: add an example for pytest In this example, python test case get the running directory by handling the "--cmdopt" option passed by pytest. Signed-off-by: YouhuaX Zhu <youhuax.zhu@intel.com>
2021-01-15 15:58:22 +08:00
CONFIG_ZTEST=y
ztest: Update ztest with more powerful testing APIs 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 <peress@google.com>
2021-10-21 04:01:43 +08:00
CONFIG_ZTEST_NEW_API=y
tests: pytest: add an example for pytest In this example, python test case get the running directory by handling the "--cmdopt" option passed by pytest. Signed-off-by: YouhuaX Zhu <youhuax.zhu@intel.com>
2021-01-15 15:58:22 +08:00
CONFIG_IDLE_STACK_SIZE=4096