testing: add zephyr/ prefix to testing include path
Continuation of issue #41543 to add prefix scope for Zephyr's include files. Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
parent
ffc0983547
commit
a7ceba3710
38 changed files with 25 additions and 17 deletions
|
@ -33,6 +33,7 @@ gen_kobj(KOBJ_GEN_DIR)
|
|||
|
||||
list(APPEND INCLUDE
|
||||
subsys/testsuite/ztest/include/zephyr
|
||||
subsys/testsuite/include/zephyr
|
||||
subsys/testsuite/ztest/include
|
||||
subsys/testsuite/include
|
||||
include/zephyr
|
||||
|
@ -63,7 +64,7 @@ target_compile_options(testbinary PRIVATE
|
|||
)
|
||||
|
||||
target_link_options(testbinary PRIVATE
|
||||
-T "${ZEPHYR_BASE}/subsys/testsuite/include/ztest_unittest.ld"
|
||||
-T "${ZEPHYR_BASE}/subsys/testsuite/include/zephyr/ztest_unittest.ld"
|
||||
)
|
||||
|
||||
target_link_libraries(testbinary PRIVATE
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
|
||||
add_subdirectory_ifdef(CONFIG_ZTEST ztest)
|
||||
|
||||
zephyr_include_directories_ifdef(CONFIG_TEST
|
||||
${ZEPHYR_BASE}/subsys/testsuite/include
|
||||
)
|
||||
if(CONFIG_TEST)
|
||||
zephyr_include_directories(${ZEPHYR_BASE}/subsys/testsuite/include)
|
||||
zephyr_include_directories_ifdef(
|
||||
CONFIG_LEGACY_INCLUDE_PATH ${ZEPHYR_BASE}/subsys/testsuite/include/zephyr)
|
||||
endif()
|
||||
add_subdirectory_ifdef(CONFIG_COVERAGE_GCOV coverage)
|
||||
|
||||
zephyr_library_sources_ifdef(CONFIG_TEST_BUSY_SIM busy_sim/busy_sim.c)
|
||||
|
|
|
@ -4,6 +4,10 @@ zephyr_include_directories(
|
|||
${ZEPHYR_BASE}/subsys/testsuite/include
|
||||
${ZEPHYR_BASE}/subsys/testsuite/ztest/include
|
||||
)
|
||||
zephyr_include_directories_ifdef(
|
||||
CONFIG_LEGACY_INCLUDE_PATH ${ZEPHYR_BASE}/subsys/testsuite/include/zephyr)
|
||||
zephyr_include_directories_ifdef(
|
||||
CONFIG_LEGACY_INCLUDE_PATH ${ZEPHYR_BASE}/subsys/testsuite/ztest/include/zephyr)
|
||||
|
||||
if(DEFINED TC_RUNID)
|
||||
zephyr_compile_definitions(TC_RUNID=${TC_RUNID})
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <ztest.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#include <zephyr/ztest.h>
|
||||
#include <zephyr/app_memory/app_memdomain.h>
|
||||
#ifdef CONFIG_USERSPACE
|
||||
#include <zephyr/sys/libc-hooks.h>
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <ztest.h>
|
||||
#include <zephyr/types.h>
|
||||
#include <zephyr/ztest.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
@ -23,10 +23,9 @@
|
|||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <zephyr/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <ztest.h>
|
||||
#include <zephyr/sys/base64.h>
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
#include "../../../lib/os/base64.c"
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <ztest.h>
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
/**
|
||||
* @brief A stub unit test.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <ztest.h>
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
ZTEST_SUITE(framework_tests, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <ztest.h>
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
static void test_empty_test(void)
|
||||
{
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <ztest.h>
|
||||
#include <busy_sim.h>
|
||||
#include <zephyr/ztest.h>
|
||||
#include <zephyr/busy_sim.h>
|
||||
|
||||
static void test_busy_sim(void)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <ztest.h>
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
static void test_assert_pass(void)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <ztest.h>
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
static void expect_one_parameter(int a)
|
||||
{
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <ztest.h>
|
||||
#include <fff.h>
|
||||
#include <zephyr/ztest.h>
|
||||
#include <zephyr/fff.h>
|
||||
|
||||
#include <c_test_framework.h>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue