Skip to content

Commit 99d7161

Browse files
aescolardleach02
authored andcommitted
tests/ztest/fail: fix board name
Use full board name in cmake file. Akin to the fix done in #80270 following the changes from #77250 Note after the Zephyr cmake code has been run the BOARD variable is split into BOARD BOARD_QUALIFIERS, where BOARD does not contain the qualifiers anymore (see cmake/modules/boards.cmake for more info). Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent 6fb3473 commit 99d7161

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/ztest/fail/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
cmake_minimum_required(VERSION 3.20.0)
55
include(ExternalProject)
66

7-
if(BOARD STREQUAL unit_testing)
7+
if(BOARD STREQUAL unit_testing/unit_testing)
88
find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE})
99
set(target testbinary)
1010
# Set the target binary for the 'core' external project. The path to this must match the one set
@@ -36,7 +36,7 @@ string(REPLACE ";" " " fail_test_config "${fail_test_config}")
3636
ExternalProject_Add(core
3737
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/core
3838
CMAKE_ARGS
39-
-DBOARD:STRING=${BOARD}
39+
-DBOARD:STRING=${BOARD}${BOARD_QUALIFIERS}
4040
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/core
4141
${fail_test_config}
4242
)

tests/ztest/fail/core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ elseif(CONFIG_ZTEST_FAIL_TEST_UNEXPECTED_ASSUME)
2323
list(APPEND test_sources src/unexpected_assume.cpp)
2424
endif()
2525

26-
if(BOARD STREQUAL unit_testing)
26+
if(BOARD STREQUAL unit_testing/unit_testing)
2727
find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE})
2828
project(base)
2929

0 commit comments

Comments
 (0)