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:
parent
0f15d89a26
commit
c3fa8b84a3
|
@ -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)
|
||||
|
||||
|
|
2
tests/ztest/base/prj.conf
Normal file
2
tests/ztest/base/prj.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_ZTEST_NEW_API=y
|
Loading…
Reference in a new issue