From 641784cd59c07ba2c9deb294e8f3e5f2810b7dc7 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Thu, 16 Nov 2023 11:38:39 +0100 Subject: [PATCH] tests/ztest/fail: Replace native_posix with native_sim In the docs replace references to native_posix with native_sim Switch the default test platform to native_sim from native_posix Signed-off-by: Alberto Escolar Piedras --- doc/develop/test/ztest.rst | 2 ++ tests/ztest/fail/README.rst | 5 +++-- tests/ztest/fail/testcase.yaml | 7 ++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/develop/test/ztest.rst b/doc/develop/test/ztest.rst index c7d3d23911e..f9255ecad2a 100644 --- a/doc/develop/test/ztest.rst +++ b/doc/develop/test/ztest.rst @@ -340,6 +340,8 @@ it needs to report either a pass or fail. For example: ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); +.. _ztest_unit_testing: + Quick start - Unit testing ************************** diff --git a/tests/ztest/fail/README.rst b/tests/ztest/fail/README.rst index 3ed70d5229a..ab5788ba821 100644 --- a/tests/ztest/fail/README.rst +++ b/tests/ztest/fail/README.rst @@ -7,8 +7,9 @@ Overview ******** In order to test the actual framework's failure cases, this test suite has to do something unique. -There's a subdirectory to this test called 'core'. This project builds a sample ``native_posix`` or -``unit_testing`` binary which is expected to fail by calling one of the following: +There's a subdirectory to this test called 'core'. This project builds a sample as a +:ref:`native_sim ` or `:ref:unit_testing ` +binary which is expected to fail by calling one of the following: - ``ztest_test_fail()`` during either the ``after`` or ``teardown`` phase of the test suite - ``ztest_test_skip()`` during either the ``after`` or ``teardown`` phase of the test suite - ``ztest_test_pass()`` during either the ``after`` or ``teardown`` phase of the test suite diff --git a/tests/ztest/fail/testcase.yaml b/tests/ztest/fail/testcase.yaml index 5295847a0cb..2a0820fa85e 100644 --- a/tests/ztest/fail/testcase.yaml +++ b/tests/ztest/fail/testcase.yaml @@ -5,7 +5,12 @@ common: tags: - test_framework # test has dependencies on host libc - platform_allow: native_posix + platform_allow: + - native_posix + - native_sim + - native_sim_64 + integration_platforms: + - native_sim tests: testing.fail.unit.assert_after: extra_configs: