diff --git a/doc/develop/test/ztest.rst b/doc/develop/test/ztest.rst index 1eff49906bf4f00..c7d3d23911e92c5 100644 --- a/doc/develop/test/ztest.rst +++ b/doc/develop/test/ztest.rst @@ -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 ********************* @@ -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: @@ -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. diff --git a/samples/sample_definition_and_criteria.rst b/samples/sample_definition_and_criteria.rst index 5a75496aff60507..be0c9dfc3ef1f3d 100644 --- a/samples/sample_definition_and_criteria.rst +++ b/samples/sample_definition_and_criteria.rst @@ -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 diff --git a/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup1/prj.conf b/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup1/prj.conf index 9228251051ec064..9467c2926896dd7 100644 --- a/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup1/prj.conf +++ b/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup1/prj.conf @@ -1,2 +1 @@ CONFIG_ZTEST=y -CONFIG_ZTEST_NEW_API=y diff --git a/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup2/prj.conf b/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup2/prj.conf index 9228251051ec064..9467c2926896dd7 100644 --- a/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup2/prj.conf +++ b/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup2/prj.conf @@ -1,2 +1 @@ CONFIG_ZTEST=y -CONFIG_ZTEST_NEW_API=y diff --git a/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group2/prj.conf b/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group2/prj.conf index 9228251051ec064..9467c2926896dd7 100644 --- a/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group2/prj.conf +++ b/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group2/prj.conf @@ -1,2 +1 @@ CONFIG_ZTEST=y -CONFIG_ZTEST_NEW_API=y diff --git a/scripts/tests/twister_blackbox/test_data/tests/dummy/device/group/prj.conf b/scripts/tests/twister_blackbox/test_data/tests/dummy/device/group/prj.conf index 9228251051ec064..9467c2926896dd7 100644 --- a/scripts/tests/twister_blackbox/test_data/tests/dummy/device/group/prj.conf +++ b/scripts/tests/twister_blackbox/test_data/tests/dummy/device/group/prj.conf @@ -1,2 +1 @@ CONFIG_ZTEST=y -CONFIG_ZTEST_NEW_API=y diff --git a/subsys/testsuite/ztest/include/zephyr/ztest_test.h b/subsys/testsuite/ztest/include/zephyr/ztest_test.h index a95a73ec4a05d76..aac7a7b2ad8807a 100644 --- a/subsys/testsuite/ztest/include/zephyr/ztest_test.h +++ b/subsys/testsuite/ztest/include/zephyr/ztest_test.h @@ -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 -#endif /** * @brief Fails the test if any of the registered tests did not run.