tf-psa-crypto: cmake: Add lcov target

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron 2024-10-17 18:33:59 +02:00
parent 4802aaab56
commit d916cc9755
3 changed files with 17 additions and 0 deletions

View File

@ -367,6 +367,17 @@ if(ENABLE_TESTING)
# additional convenience targets for Unix only
if(UNIX)
# For coverage testing:
# 1. Build with:
# cmake -D CMAKE_BUILD_TYPE=Coverage /path/to/source && make
# 2. Run the relevant tests for the part of the code you're interested in.
# For the reference coverage measurement, see
# tests/scripts/basic-build-test.sh
# 3. Run scripts/lcov.sh to generate an HTML report.
ADD_CUSTOM_TARGET(lcov
COMMAND ${MBEDTLS_DIR}/scripts/lcov.sh
)
ADD_CUSTOM_TARGET(memcheck
COMMAND sed -i.bak s+/usr/bin/valgrind+`which valgrind`+ DartConfiguration.tcl
COMMAND ctest -O memcheck.log -D ExperimentalMemCheck

View File

@ -350,5 +350,6 @@ if (NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/seedfile")
link_to_source(seedfile)
endif()
link_to_source(Descriptions.txt)
link_to_source(../../framework/data_files)
endif()

View File

@ -0,0 +1,5 @@
test_suites
The various 'test_suite_XXX' programs from the 'tests' directory, executed
using 'make check' (Unix make) or 'make test' (Cmake), include test cases
(reference test vectors, sanity checks, malformed input for parsing
functions, etc.) for all modules except the SSL modules.