unittest: add support for coverage
Some missing features for getting coverage data for unit tests: - Setting the unit_testing board to have coverage support and native application. - Fixing the CONFIG_COVERAGE check Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
parent
ef7d0d6c01
commit
49ca6f8f7d
2 changed files with 3 additions and 1 deletions
|
@ -93,7 +93,7 @@ target_link_libraries(testbinary PRIVATE
|
||||||
${EXTRA_LDFLAGS_AS_LIST}
|
${EXTRA_LDFLAGS_AS_LIST}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(COVERAGE)
|
if(CONFIG_COVERAGE)
|
||||||
target_compile_options(test_interface INTERFACE $<TARGET_PROPERTY:compiler,coverage>)
|
target_compile_options(test_interface INTERFACE $<TARGET_PROPERTY:compiler,coverage>)
|
||||||
|
|
||||||
target_link_libraries(testbinary PRIVATE $<TARGET_PROPERTY:linker,coverage>)
|
target_link_libraries(testbinary PRIVATE $<TARGET_PROPERTY:linker,coverage>)
|
||||||
|
|
|
@ -4,5 +4,7 @@
|
||||||
|
|
||||||
config BOARD_UNIT_TESTING
|
config BOARD_UNIT_TESTING
|
||||||
bool "Unit testing board"
|
bool "Unit testing board"
|
||||||
|
select HAS_COVERAGE_SUPPORT
|
||||||
|
select NATIVE_APPLICATION
|
||||||
help
|
help
|
||||||
Board for unit testing
|
Board for unit testing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue