Skip to content

Commit

Permalink
doc: ztest: adapt ztest docs
Browse files Browse the repository at this point in the history
Remove remaining usage and documenation of dropped kconfig that is now
the default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information
nashif committed Oct 16, 2023
1 parent 568dee3 commit a57eabe
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 14 deletions.
8 changes: 2 additions & 6 deletions doc/develop/test/ztest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ test structure.
The framework can be used in two ways, either as a generic framework for
integration testing, or for unit testing specific modules.

To enable support for the latest Ztest API, set
:kconfig:option:`CONFIG_ZTEST_NEW_API` to ``y``. There is also a legacy API
that is deprecated and will eventually be removed.

Creating a test suite
*********************

Expand Down Expand Up @@ -581,7 +577,7 @@ Shuffling Test Sequence
By default the tests are sorted and ran in alphanumerical order. Test cases may
be dependent on this sequence. Enable :kconfig:option:`CONFIG_ZTEST_SHUFFLE` to
randomize the order. The output from the test will display the seed for failed
tests. For native posix builds you can provide the seed as an argument to
tests. For native simulator builds you can provide the seed as an argument to
twister with `--seed`

Static configuration of ZTEST_SHUFFLE contains:
Expand All @@ -592,7 +588,7 @@ Static configuration of ZTEST_SHUFFLE contains:

Test Selection
**************
For POSIX enabled builds with ZTEST_NEW_API use command line arguments to list
For tests built for native simulator, use command line arguments to list
or select tests to run. The test argument expects a comma separated list
of ``suite::test`` . You can substitute the test name with an ``*`` to run all
tests within a suite.
Expand Down
2 changes: 1 addition & 1 deletion samples/sample_definition_and_criteria.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Sample Criteria
* The primary purpose of a sample is to provide a reference to the user.
* Samples must not use Zephyr's testing framework.

* Must not use :kconfig:option:`CONFIG_ZTEST` or :kconfig:option:`CONFIG_ZTEST_NEW_API`.
* Must not use :kconfig:option:`CONFIG_ZTEST`
* Must not use zasserts in samples.

* If a sample can provide output that can be verified, then output should be evaluated against
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
3 changes: 0 additions & 3 deletions subsys/testsuite/ztest/include/zephyr/ztest_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,6 @@ __syscall void __ztest_set_test_result(enum ztest_result new_result);
__syscall void __ztest_set_test_phase(enum ztest_phase new_phase);
#endif

#ifndef ZTEST_UNITTEST
#include <syscalls/ztest_test.h>
#endif

/**
* @brief Fails the test if any of the registered tests did not run.
Expand Down

0 comments on commit a57eabe

Please sign in to comment.