Commit 99d7161e authored by Alberto Escolar Piedras's avatar Alberto Escolar Piedras Committed by David Leach
Browse files

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: default avatarAlberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
parent 6fb34733
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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}
)
+1 −1
Original line number Diff line number Diff line
@@ -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)