Merge switch to codecov into bleeding
This commit is contained in:
commit
8e8f03897b
4 changed files with 36 additions and 2 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,7 +30,8 @@ script:
|
|||
- make criterion_tests
|
||||
- make test
|
||||
after_success:
|
||||
- make coveralls
|
||||
- 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,6 +170,13 @@ install(TARGETS criterion
|
|||
|
||||
add_custom_target(criterion_tests)
|
||||
|
||||
add_custom_target(gcov
|
||||
"${CMAKE_COMMAND}"
|
||||
-DSOURCE_FILES="${SOURCE_FILES}"
|
||||
-DCOV_PATH="${CMAKE_CURRENT_BINARY_DIR}"
|
||||
-P "${CMAKE_MODULE_PATH}/Gcov.cmake"
|
||||
)
|
||||
|
||||
enable_testing()
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(test)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
[](https://travis-ci.org/Snaipe/Criterion)
|
||||
[](https://ci.appveyor.com/project/Snaipe/Criterion/branch/bleeding)
|
||||
[](https://coveralls.io/r/Snaipe/Criterion?branch=bleeding)
|
||||
[](https://codecov.io/github/Snaipe/Criterion?branch=bleeding)
|
||||
[](https://github.com/Snaipe/Criterion/blob/master/LICENSE)
|
||||
[](https://github.com/Snaipe/Criterion/releases)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue