diff --git a/cmake/modules/unittest.cmake b/cmake/modules/unittest.cmake index 5bc6765338d..be5fa56741a 100644 --- a/cmake/modules/unittest.cmake +++ b/cmake/modules/unittest.cmake @@ -93,7 +93,7 @@ target_link_libraries(testbinary PRIVATE ${EXTRA_LDFLAGS_AS_LIST} ) -if(COVERAGE) +if(CONFIG_COVERAGE) target_compile_options(test_interface INTERFACE $) target_link_libraries(testbinary PRIVATE $) diff --git a/subsys/testsuite/boards/unit_testing/unit_testing/Kconfig.board b/subsys/testsuite/boards/unit_testing/unit_testing/Kconfig.board index 88c43c26dc8..2b10e976b8c 100644 --- a/subsys/testsuite/boards/unit_testing/unit_testing/Kconfig.board +++ b/subsys/testsuite/boards/unit_testing/unit_testing/Kconfig.board @@ -4,5 +4,7 @@ config BOARD_UNIT_TESTING bool "Unit testing board" + select HAS_COVERAGE_SUPPORT + select NATIVE_APPLICATION help Board for unit testing