mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 02:35:48 +01:00
Adjust prerequisites for tests in cmake
This commit is contained in:
parent
abc729e664
commit
d3a9166afe
@ -73,31 +73,37 @@ ADD_CUSTOM_TARGET(apidoc
|
|||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
if(ENABLE_TESTING)
|
if(ENABLE_TESTING)
|
||||||
add_subdirectory(tests)
|
find_package(PERL)
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(covtest
|
if(PERL_FOUND)
|
||||||
COMMAND make test
|
add_subdirectory(tests)
|
||||||
COMMAND programs/test/selftest
|
|
||||||
COMMAND cd tests && ./compat.sh
|
|
||||||
COMMAND cd tests && ./ssl-opt.sh
|
|
||||||
)
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(lcov
|
if(UNIX)
|
||||||
COMMAND rm -rf Coverage
|
ADD_CUSTOM_TARGET(covtest
|
||||||
COMMAND lcov --capture --initial --directory library/CMakeFiles/mbedtls.dir -o files.info
|
COMMAND make test
|
||||||
COMMAND lcov --capture --directory library/CMakeFiles/mbedtls.dir -o tests.info
|
COMMAND programs/test/selftest
|
||||||
COMMAND lcov --add-tracefile files.info --add-tracefile tests.info -o all.info
|
COMMAND cd tests && ./compat.sh
|
||||||
COMMAND lcov --remove all.info -o final.info '*.h'
|
COMMAND cd tests && ./ssl-opt.sh
|
||||||
COMMAND gendesc tests/Descriptions.txt -o descriptions
|
)
|
||||||
COMMAND genhtml --title "mbed TLS" --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info
|
|
||||||
COMMAND rm -f files.info tests.info all.info final.info descriptions
|
|
||||||
)
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(memcheck
|
ADD_CUSTOM_TARGET(lcov
|
||||||
COMMAND sed -i.bak s+/usr/bin/valgrind+`which valgrind`+ DartConfiguration.tcl
|
COMMAND rm -rf Coverage
|
||||||
COMMAND ctest -O memcheck.log -D ExperimentalMemCheck
|
COMMAND lcov --capture --initial --directory library/CMakeFiles/mbedtls.dir -o files.info
|
||||||
COMMAND tail -n1 memcheck.log | grep 'Memory checking results:' > /dev/null
|
COMMAND lcov --capture --directory library/CMakeFiles/mbedtls.dir -o tests.info
|
||||||
COMMAND rm -f memcheck.log
|
COMMAND lcov --add-tracefile files.info --add-tracefile tests.info -o all.info
|
||||||
COMMAND mv DartConfiguration.tcl.bak DartConfiguration.tcl
|
COMMAND lcov --remove all.info -o final.info '*.h'
|
||||||
)
|
COMMAND gendesc tests/Descriptions.txt -o descriptions
|
||||||
|
COMMAND genhtml --title "mbed TLS" --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info
|
||||||
|
COMMAND rm -f files.info tests.info all.info final.info descriptions
|
||||||
|
)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(memcheck
|
||||||
|
COMMAND sed -i.bak s+/usr/bin/valgrind+`which valgrind`+ DartConfiguration.tcl
|
||||||
|
COMMAND ctest -O memcheck.log -D ExperimentalMemCheck
|
||||||
|
COMMAND tail -n1 memcheck.log | grep 'Memory checking results:' > /dev/null
|
||||||
|
COMMAND rm -f memcheck.log
|
||||||
|
COMMAND mv DartConfiguration.tcl.bak DartConfiguration.tcl
|
||||||
|
)
|
||||||
|
endif(UNIX)
|
||||||
|
endif(PERL_FOUND)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user