IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 220b9600 authored by ralfulrich's avatar ralfulrich
Browse files

coverage

parent 354798e6
No related branches found
No related tags found
1 merge request!371Additional outputs ported to new architecture
Pipeline #5880 passed
......@@ -153,11 +153,14 @@ if (CMAKE_BUILD_TYPE STREQUAL Coverage)
endif ()
set (GCOV gcov CACHE STRING "gcov executable" FORCE)
# collect coverage data
add_custom_command (
OUTPUT raw-coverage.info
COMMAND ${CMAKE_COMMAND} -E echo "Note: you need to run ctest at least once to generate the coverage data"
COMMAND ${c8_lcov_bin} --gcov-tool=${GCOV} --directory . --capture --output-file raw-coverage.info
COMMAND ${c8_lcov_bin} --gcov-tool=${GCOV} --rc lcov_branch_coverage=1
--directory . --capture --output-file raw-coverage.info
)
# remove uninteresting entries
add_custom_command (
......@@ -174,7 +177,7 @@ if (CMAKE_BUILD_TYPE STREQUAL Coverage)
# generate html report
add_custom_command (
OUTPUT coverage-report
COMMAND ${c8_genhtml_bin} --demangle-cpp coverage.info -o coverage-report
COMMAND ${c8_genhtml_bin} --branch-coverage --show-details --title "CORSIKA 8 test coverage" --legend --demangle-cpp coverage.info -o coverage-report
DEPENDS coverage.info
)
add_custom_target (coverage DEPENDS coverage-report)
......
......@@ -112,6 +112,11 @@ TEST_CASE("OutputManager") {
DummyOutput test;
output->add("test", test);
output->startOfLibrary();
// cannot add more after library started
DummyOutput test2;
CHECK_THROWS(output->add("test2", test2));
output->startOfShower();
// check support for closing automatically
......
......@@ -35,9 +35,7 @@ TEST_CASE("WriterOff") {
test.startOfLibrary("./output_dir_eloss");
test.startOfShower(0);
test.endOfShower(0);
test.endOfLibrary();
auto const config = test.getConfig();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment