Specified correct gcov params for codecov script
This commit is contained in:
parent
d4d29f6023
commit
6faf505089
4 changed files with 34 additions and 5 deletions
26
.cmake/Modules/Gcov.cmake
Normal file
26
.cmake/Modules/Gcov.cmake
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
if (NOT DEFINED ENV{GCOV})
|
||||
find_program(GCOV_EXECUTABLE gcov)
|
||||
else()
|
||||
find_program(GCOV_EXECUTABLE $ENV{GCOV})
|
||||
endif()
|
||||
|
||||
#file(GLOB_RECURSE GCNO_FILES "${CMAKE_CURRENT_BINARY_DIR}/*.gcno")
|
||||
if (WIN32)
|
||||
file(GLOB_RECURSE GCDA_FILES "${COV_PATH}\\*.gcda")
|
||||
else ()
|
||||
file(GLOB_RECURSE GCDA_FILES "${COV_PATH}/*.gcda")
|
||||
endif ()
|
||||
|
||||
#execute_process(
|
||||
# COMMAND ${GCOV_EXECUTABLE} -lcp ${GCNO_FILES}
|
||||
# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
#)
|
||||
|
||||
foreach (GCDA ${GCDA_FILES})
|
||||
get_filename_component(DIR ${GCDA} PATH)
|
||||
execute_process(
|
||||
COMMAND ${GCOV_EXECUTABLE} -lcp -o ${DIR} ${GCDA}
|
||||
WORKING_DIRECTORY ${COV_PATH}
|
||||
)
|
||||
endforeach ()
|
|
@ -30,8 +30,8 @@ script:
|
|||
- make criterion_tests
|
||||
- make test
|
||||
after_success:
|
||||
- make gcov VERBOSE=1
|
||||
- bash <(curl -s https://codecov.io/bash) -g 'dependencies/*'
|
||||
- make gcov
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
after_failure:
|
||||
- cat Testing/Temporary/LastTest.log samples/*.{out,err} ../samples/tests/*.{out,err}
|
||||
env:
|
||||
|
|
|
@ -170,10 +170,11 @@ install(TARGETS criterion
|
|||
|
||||
add_custom_target(criterion_tests)
|
||||
|
||||
file(GLOB_RECURSE GCNO_FILES "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/*.gcno")
|
||||
|
||||
add_custom_target(gcov
|
||||
"gcov" "-lcp" ${GCNO_FILES}
|
||||
"${CMAKE_COMMAND}"
|
||||
-DSOURCE_FILES="${SOURCE_FILES}"
|
||||
-DCOV_PATH="${CMAKE_CURRENT_BINARY_DIR}"
|
||||
-P "${CMAKE_MODULE_PATH}/Gcov.cmake"
|
||||
)
|
||||
|
||||
enable_testing()
|
||||
|
|
|
@ -59,6 +59,8 @@ test_script:
|
|||
|
||||
after_test:
|
||||
- 'make gcov'
|
||||
- 'cd ..'
|
||||
- 'bash -lc "find / -iname \"*.gcda\""'
|
||||
- codecov
|
||||
#after_test:
|
||||
# - 'make coveralls'
|
||||
|
|
Loading…
Add table
Reference in a new issue