From ffc0983547a8cb9b5671bdc4bc14178a1ac732e9 Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Tue, 21 Jun 2022 11:50:02 -0600 Subject: [PATCH] test: unittest: Fix deprecated ZephyrUnittest Fix the deprecated calls to loading ZephyrUnittest by replacing them with `Zephyr COMPONENTS unittest`. Signed-off-by: Yuval Peress --- tests/bluetooth/controller/ctrl_api/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_chmu/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_collision/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_conn_update/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_cte_req/CMakeLists.txt | 2 +- .../bluetooth/controller/ctrl_data_length_update/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_encrypt/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_feature_exchange/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_hci/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_invalid/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_le_ping/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_min_used_chans/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_phy_update/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_terminate/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_tx_buffer_alloc/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_tx_queue/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_unsupported/CMakeLists.txt | 2 +- tests/bluetooth/controller/ctrl_version/CMakeLists.txt | 2 +- tests/unit/base64/CMakeLists.txt | 2 +- tests/unit/cbprintf/CMakeLists.txt | 2 +- tests/unit/crc/CMakeLists.txt | 2 +- tests/unit/intmath/CMakeLists.txt | 2 +- tests/unit/list/CMakeLists.txt | 2 +- tests/unit/math_extras/CMakeLists.txt | 2 +- tests/unit/net_timeout/CMakeLists.txt | 2 +- tests/unit/rbtree/CMakeLists.txt | 2 +- tests/unit/timeutil/CMakeLists.txt | 2 +- tests/unit/util/CMakeLists.txt | 2 +- tests/unit/winstream/CMakeLists.txt | 2 +- tests/ztest/base/CMakeLists.txt | 2 +- tests/ztest/mock/CMakeLists.txt | 2 +- 31 files changed, 31 insertions(+), 31 deletions(-) diff --git a/tests/bluetooth/controller/ctrl_api/CMakeLists.txt b/tests/bluetooth/controller/ctrl_api/CMakeLists.txt index 4c4ccfed1ba..2a04ef6486c 100644 --- a/tests/bluetooth/controller/ctrl_api/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_api/CMakeLists.txt @@ -11,6 +11,6 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_api) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_chmu/CMakeLists.txt b/tests/bluetooth/controller/ctrl_chmu/CMakeLists.txt index 80a122e4b2a..253f737ef14 100644 --- a/tests/bluetooth/controller/ctrl_chmu/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_chmu/CMakeLists.txt @@ -11,6 +11,6 @@ FILE(GLOB SOURCES ) project(bluetooth_ctrl_ull_conn) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_collision/CMakeLists.txt b/tests/bluetooth/controller/ctrl_collision/CMakeLists.txt index a6850bdf1fa..3611d572e14 100644 --- a/tests/bluetooth/controller/ctrl_collision/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_collision/CMakeLists.txt @@ -11,7 +11,7 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_collision) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_conn_update/CMakeLists.txt b/tests/bluetooth/controller/ctrl_conn_update/CMakeLists.txt index 80a122e4b2a..253f737ef14 100644 --- a/tests/bluetooth/controller/ctrl_conn_update/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_conn_update/CMakeLists.txt @@ -11,6 +11,6 @@ FILE(GLOB SOURCES ) project(bluetooth_ctrl_ull_conn) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_cte_req/CMakeLists.txt b/tests/bluetooth/controller/ctrl_cte_req/CMakeLists.txt index b941a99ad36..08dfba08e11 100644 --- a/tests/bluetooth/controller/ctrl_cte_req/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_cte_req/CMakeLists.txt @@ -14,7 +14,7 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_le_cte_req) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) set(CMAKE_BUILD_TYPE Debug) diff --git a/tests/bluetooth/controller/ctrl_data_length_update/CMakeLists.txt b/tests/bluetooth/controller/ctrl_data_length_update/CMakeLists.txt index 042cb91a890..c97e69bc2c4 100644 --- a/tests/bluetooth/controller/ctrl_data_length_update/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_data_length_update/CMakeLists.txt @@ -18,7 +18,7 @@ if(CONFIG_BT_CTLR_PHY) endif(CONFIG_BT_CTLR_PHY) project(bluetooth_ull_llcp_data_length_update) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) if(NOT CONFIG_BT_CTLR_PHY) list(REMOVE_ITEM ll_sw_sources ${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_llcp_phy.c) diff --git a/tests/bluetooth/controller/ctrl_encrypt/CMakeLists.txt b/tests/bluetooth/controller/ctrl_encrypt/CMakeLists.txt index c263240e7c5..8f3f2845e6a 100644 --- a/tests/bluetooth/controller/ctrl_encrypt/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_encrypt/CMakeLists.txt @@ -11,6 +11,6 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_encrypt) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_feature_exchange/CMakeLists.txt b/tests/bluetooth/controller/ctrl_feature_exchange/CMakeLists.txt index e0c4b716919..45bae44f2ef 100644 --- a/tests/bluetooth/controller/ctrl_feature_exchange/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_feature_exchange/CMakeLists.txt @@ -11,6 +11,6 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_feature_exchange) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_hci/CMakeLists.txt b/tests/bluetooth/controller/ctrl_hci/CMakeLists.txt index e0c4b716919..45bae44f2ef 100644 --- a/tests/bluetooth/controller/ctrl_hci/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_hci/CMakeLists.txt @@ -11,6 +11,6 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_feature_exchange) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_invalid/CMakeLists.txt b/tests/bluetooth/controller/ctrl_invalid/CMakeLists.txt index 5eb85b4dda8..2fb4874ad53 100644 --- a/tests/bluetooth/controller/ctrl_invalid/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_invalid/CMakeLists.txt @@ -11,7 +11,7 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_invalid) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_le_ping/CMakeLists.txt b/tests/bluetooth/controller/ctrl_le_ping/CMakeLists.txt index 0e376e79904..77eb0b98d65 100644 --- a/tests/bluetooth/controller/ctrl_le_ping/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_le_ping/CMakeLists.txt @@ -11,6 +11,6 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_le_ping) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_min_used_chans/CMakeLists.txt b/tests/bluetooth/controller/ctrl_min_used_chans/CMakeLists.txt index 5d522e1bb64..af9e191e28e 100644 --- a/tests/bluetooth/controller/ctrl_min_used_chans/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_min_used_chans/CMakeLists.txt @@ -11,6 +11,6 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_min_used_chans) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_phy_update/CMakeLists.txt b/tests/bluetooth/controller/ctrl_phy_update/CMakeLists.txt index 89c27942c6f..0b31cd7d84f 100644 --- a/tests/bluetooth/controller/ctrl_phy_update/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_phy_update/CMakeLists.txt @@ -11,6 +11,6 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_phy_update) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_terminate/CMakeLists.txt b/tests/bluetooth/controller/ctrl_terminate/CMakeLists.txt index 38b57108649..c423eac89e0 100644 --- a/tests/bluetooth/controller/ctrl_terminate/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_terminate/CMakeLists.txt @@ -11,6 +11,6 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_terminate) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_tx_buffer_alloc/CMakeLists.txt b/tests/bluetooth/controller/ctrl_tx_buffer_alloc/CMakeLists.txt index a79c02ad7ea..cbfaaf445d0 100644 --- a/tests/bluetooth/controller/ctrl_tx_buffer_alloc/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_tx_buffer_alloc/CMakeLists.txt @@ -14,6 +14,6 @@ if(CONFIG_BT_CTLR_LLCP_PER_CONN_TX_CTRL_BUF_NUM GREATER_EQUAL 0) endif(CONFIG_BT_CTLR_LLCP_PER_CONN_TX_CTRL_BUF_NUM) project(bluetooth_ull_llcp_tx_buffer_alloc) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_tx_queue/CMakeLists.txt b/tests/bluetooth/controller/ctrl_tx_queue/CMakeLists.txt index 9fb96eed112..6639d0d7b7c 100644 --- a/tests/bluetooth/controller/ctrl_tx_queue/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_tx_queue/CMakeLists.txt @@ -11,6 +11,6 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_tx_queue) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/bluetooth/controller/ctrl_unsupported/CMakeLists.txt b/tests/bluetooth/controller/ctrl_unsupported/CMakeLists.txt index e39bf2cf705..33c9e0ef3d1 100644 --- a/tests/bluetooth/controller/ctrl_unsupported/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_unsupported/CMakeLists.txt @@ -31,7 +31,7 @@ if(NO_PHY) endif() project(bluetooth_ull_llcp_unsupported) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) # Remove ull_llcp_enc.c from compile diff --git a/tests/bluetooth/controller/ctrl_version/CMakeLists.txt b/tests/bluetooth/controller/ctrl_version/CMakeLists.txt index 923aebffb4d..68c71bccf18 100644 --- a/tests/bluetooth/controller/ctrl_version/CMakeLists.txt +++ b/tests/bluetooth/controller/ctrl_version/CMakeLists.txt @@ -11,6 +11,6 @@ FILE(GLOB SOURCES ) project(bluetooth_ull_llcp_version) -find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE}) include(${ZEPHYR_BASE}/tests/bluetooth/controller/common/defaults_cmake.txt) target_sources(testbinary PRIVATE ${ll_sw_sources} ${mock_sources} ${common_sources}) diff --git a/tests/unit/base64/CMakeLists.txt b/tests/unit/base64/CMakeLists.txt index e1e9d434e90..3fca1e1100a 100644 --- a/tests/unit/base64/CMakeLists.txt +++ b/tests/unit/base64/CMakeLists.txt @@ -4,4 +4,4 @@ cmake_minimum_required(VERSION 3.20.0) project(base64) set(SOURCES main.c) -find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/cbprintf/CMakeLists.txt b/tests/unit/cbprintf/CMakeLists.txt index da17fc20ead..7b12bb7e49a 100644 --- a/tests/unit/cbprintf/CMakeLists.txt +++ b/tests/unit/cbprintf/CMakeLists.txt @@ -4,4 +4,4 @@ cmake_minimum_required(VERSION 3.20.0) project(lib_os_cbprintf) set(SOURCES main.c) -find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/crc/CMakeLists.txt b/tests/unit/crc/CMakeLists.txt index a064ad29223..18afe3f4ad9 100644 --- a/tests/unit/crc/CMakeLists.txt +++ b/tests/unit/crc/CMakeLists.txt @@ -4,4 +4,4 @@ cmake_minimum_required(VERSION 3.20.0) project(crc) set(SOURCES main.c) -find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/intmath/CMakeLists.txt b/tests/unit/intmath/CMakeLists.txt index 4a0b5e2eb6e..f5904070154 100644 --- a/tests/unit/intmath/CMakeLists.txt +++ b/tests/unit/intmath/CMakeLists.txt @@ -6,4 +6,4 @@ project(base64) set(SOURCES main.c ) -find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/list/CMakeLists.txt b/tests/unit/list/CMakeLists.txt index 3495f67415e..0114cc8061d 100644 --- a/tests/unit/list/CMakeLists.txt +++ b/tests/unit/list/CMakeLists.txt @@ -9,4 +9,4 @@ set(SOURCES dlist.c sflist.c ) -find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/math_extras/CMakeLists.txt b/tests/unit/math_extras/CMakeLists.txt index 1cbbc11c7cb..5cb326ac8ee 100644 --- a/tests/unit/math_extras/CMakeLists.txt +++ b/tests/unit/math_extras/CMakeLists.txt @@ -4,4 +4,4 @@ cmake_minimum_required(VERSION 3.20.0) project(math_extras) set(SOURCES main.c portable.c) -find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/net_timeout/CMakeLists.txt b/tests/unit/net_timeout/CMakeLists.txt index 2c497986579..8d1bc0c9262 100644 --- a/tests/unit/net_timeout/CMakeLists.txt +++ b/tests/unit/net_timeout/CMakeLists.txt @@ -4,4 +4,4 @@ cmake_minimum_required(VERSION 3.20.0) project(lib_net_timeout) set(SOURCES main.c) -find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/rbtree/CMakeLists.txt b/tests/unit/rbtree/CMakeLists.txt index 55dad5ba00e..00bff74b5fb 100644 --- a/tests/unit/rbtree/CMakeLists.txt +++ b/tests/unit/rbtree/CMakeLists.txt @@ -4,4 +4,4 @@ cmake_minimum_required(VERSION 3.20.0) project(rbtree) set(SOURCES main.c) -find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/timeutil/CMakeLists.txt b/tests/unit/timeutil/CMakeLists.txt index b01305bd586..ca8693cabeb 100644 --- a/tests/unit/timeutil/CMakeLists.txt +++ b/tests/unit/timeutil/CMakeLists.txt @@ -5,4 +5,4 @@ cmake_minimum_required(VERSION 3.20.0) project(timeutil) set(SOURCES main.c test_gmtime.c test_s32.c test_s64.c test_sync.c) -find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/util/CMakeLists.txt b/tests/unit/util/CMakeLists.txt index 3b5099a37f7..b78fc52e03b 100644 --- a/tests/unit/util/CMakeLists.txt +++ b/tests/unit/util/CMakeLists.txt @@ -4,4 +4,4 @@ cmake_minimum_required(VERSION 3.20.0) project(util) set(SOURCES main.c maincxx.cxx ../../../lib/os/dec.c) -find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/winstream/CMakeLists.txt b/tests/unit/winstream/CMakeLists.txt index 80dbd6c58f0..7966f447dc9 100644 --- a/tests/unit/winstream/CMakeLists.txt +++ b/tests/unit/winstream/CMakeLists.txt @@ -2,4 +2,4 @@ project(winstream) cmake_minimum_required(VERSION 3.20.0) set(SOURCES main.c) -find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) +find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/ztest/base/CMakeLists.txt b/tests/ztest/base/CMakeLists.txt index c12b9efc238..9f5879a5a14 100644 --- a/tests/ztest/base/CMakeLists.txt +++ b/tests/ztest/base/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.20.0) if(BOARD STREQUAL unit_testing) list(APPEND SOURCES src/main_deprecated.c) - find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) + find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(base) else() find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/ztest/mock/CMakeLists.txt b/tests/ztest/mock/CMakeLists.txt index 0cc68ce9811..e3b9661051a 100644 --- a/tests/ztest/mock/CMakeLists.txt +++ b/tests/ztest/mock/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.20.0) if(BOARD STREQUAL unit_testing) list(APPEND SOURCES src/main.c) - find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) + find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(mock) else() find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})