diff --git a/projects/hip-tests/.gitignore b/projects/hip-tests/.gitignore index 4a76ca2cf4..029ed76f3a 100644 --- a/projects/hip-tests/.gitignore +++ b/projects/hip-tests/.gitignore @@ -14,3 +14,9 @@ samples/0_Intro/module_api/vcpy_kernel.co samples/0_Intro/module_api/vcpy_kernel.code samples/1_Utils/hipInfo/hipInfo samples/1_Utils/hipDispatchLatency/hipDispatchLatency + +utils/coverage/generateHipAPICoverage +utils/coverage/CoverageReport.xml +utils/coverage/coverageReportHTML/CoverageReport.html +utils/coverage/coverageReportHTML/testAPIs +utils/coverage/coverageReportHTML/testModules diff --git a/projects/hip-tests/catch/CMakeLists.txt b/projects/hip-tests/catch/CMakeLists.txt index 7766df816c..0f852cc91b 100644 --- a/projects/hip-tests/catch/CMakeLists.txt +++ b/projects/hip-tests/catch/CMakeLists.txt @@ -303,6 +303,12 @@ add_subdirectory(perftests ${CATCH_BUILD_DIR}/perftests) add_subdirectory(multiproc ${CATCH_BUILD_DIR}/multiproc) add_subdirectory(performance ${CATCH_BUILD_DIR}/performance) +add_custom_target(gen_coverage + COMMAND ${CMAKE_MAKE_PROGRAM} default_target + COMMAND ./generateHipAPICoverage ${HIP_PATH}/include + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../utils/coverage + COMMENT "Generating Test Coverage Report") + cmake_policy(POP) # packaging the tests diff --git a/projects/hip-tests/utils/coverage/Makefile b/projects/hip-tests/utils/coverage/Makefile index f81c71037d..8c04063b67 100644 --- a/projects/hip-tests/utils/coverage/Makefile +++ b/projects/hip-tests/utils/coverage/Makefile @@ -26,8 +26,10 @@ OBJ=generateHipAPICoverage default_target: all .PHONY : default_target -all: ${SRC} - ${CC} ${CPPFLAGS} $^ -o ${OBJ} +all: ${OBJ} + +${OBJ}: ${SRC} + @${CC} ${CPPFLAGS} $^ -o ${OBJ} clean: rm -f ${OBJ}