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 <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2022-08-05 15:10:08 +02:00 committed by Carles Cufí
parent 0f15d89a26
commit c3fa8b84a3
2 changed files with 2 additions and 4 deletions

View file

@ -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)

View file

@ -0,0 +1,2 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y