From c3fa8b84a36871d0417832dbdd26cb345f79c44f Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Fri, 5 Aug 2022 15:10:08 +0200 Subject: [PATCH] tests: adopt ztest base test to extended unittest module With the support of Kconfig in unittest CMake module then prj.conf is now supported. Add a prj.conf with ZTEST config settings and remove hardcoded values from CMakeLists.txt file. Signed-off-by: Torsten Rasmussen --- tests/ztest/base/CMakeLists.txt | 4 ---- tests/ztest/base/prj.conf | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) create mode 100644 tests/ztest/base/prj.conf diff --git a/tests/ztest/base/CMakeLists.txt b/tests/ztest/base/CMakeLists.txt index b3bbdeffb2a..1b65db6d137 100644 --- a/tests/ztest/base/CMakeLists.txt +++ b/tests/ztest/base/CMakeLists.txt @@ -2,10 +2,6 @@ cmake_minimum_required(VERSION 3.20.0) if(BOARD STREQUAL unit_testing) - - # Use the new ztest API - set(CONFIG_ZTEST_NEW_API TRUE CACHE BOOL "" FORCE) - # Add the sources list(APPEND SOURCES src/main.c) diff --git a/tests/ztest/base/prj.conf b/tests/ztest/base/prj.conf new file mode 100644 index 00000000000..9228251051e --- /dev/null +++ b/tests/ztest/base/prj.conf @@ -0,0 +1,2 @@ +CONFIG_ZTEST=y +CONFIG_ZTEST_NEW_API=y