tests/ztest/fail: fix board name

Use full board name in cmake file.
Akin to the fix done in
https://github.com/zephyrproject-rtos/zephyr/pull/80270/
following the changes from
https://github.com/zephyrproject-rtos/zephyr/pull/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 <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2024-10-23 10:38:34 +02:00 committed by David Leach
commit 99d7161e34
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.20.0)
include(ExternalProject)
if(BOARD STREQUAL unit_testing)
if(BOARD STREQUAL unit_testing/unit_testing)
find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE})
set(target testbinary)
# 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}")
ExternalProject_Add(core
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/core
CMAKE_ARGS
-DBOARD:STRING=${BOARD}
-DBOARD:STRING=${BOARD}${BOARD_QUALIFIERS}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/core
${fail_test_config}
)

View file

@ -23,7 +23,7 @@ elseif(CONFIG_ZTEST_FAIL_TEST_UNEXPECTED_ASSUME)
list(APPEND test_sources src/unexpected_assume.cpp)
endif()
if(BOARD STREQUAL unit_testing)
if(BOARD STREQUAL unit_testing/unit_testing)
find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(base)