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:
Yuval Peress 2022-04-19 11:54:42 -06:00 committed by Anas Nashif
commit a7ceba3710
38 changed files with 25 additions and 17 deletions

View file

@ -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)

View file

@ -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})

View file

@ -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>

View file

@ -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>