From ff8c78154fab68939d8e1543b0d23278aa19bb04 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Tue, 4 Jul 2023 12:49:06 +0100 Subject: [PATCH] tests: application_development: code_relocation: Add absolute paths Adds some absolute paths to check that the feature is working correctly. Signed-off-by: Jamie McCrae --- tests/application_development/code_relocation/CMakeLists.txt | 2 +- .../code_relocation/test_lib/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/application_development/code_relocation/CMakeLists.txt b/tests/application_development/code_relocation/CMakeLists.txt index f731fea70ed..132c905895e 100644 --- a/tests/application_development/code_relocation/CMakeLists.txt +++ b/tests/application_development/code_relocation/CMakeLists.txt @@ -17,7 +17,7 @@ endif() # Code relocation feature zephyr_code_relocate(FILES src/test_file1.c ${SRAM2_PHDR} LOCATION SRAM2) -zephyr_code_relocate(FILES src/test_file2.c ${RAM_PHDR} LOCATION RAM) +zephyr_code_relocate(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/test_file2.c ${RAM_PHDR} LOCATION RAM) # Add custom library that we can relocate code for add_subdirectory(test_lib) diff --git a/tests/application_development/code_relocation/test_lib/CMakeLists.txt b/tests/application_development/code_relocation/test_lib/CMakeLists.txt index 86fa18b38d6..d660949a80e 100644 --- a/tests/application_development/code_relocation/test_lib/CMakeLists.txt +++ b/tests/application_development/code_relocation/test_lib/CMakeLists.txt @@ -2,7 +2,7 @@ # Copyright 2022 NXP add_library(test_lib STATIC "") -target_sources(test_lib PRIVATE test_lib1.c test_lib2.c) +target_sources(test_lib PRIVATE test_lib1.c ${CMAKE_CURRENT_SOURCE_DIR}/test_lib2.c) get_target_property(include_dirs app INCLUDE_DIRECTORIES) target_link_libraries(test_lib PUBLIC zephyr_interface) add_dependencies(test_lib zephyr_generated_headers)