From e280628597cd7c016696cbd16906e8091176a9ff Mon Sep 17 00:00:00 2001 From: Arun Date: Wed, 13 Jul 2022 10:08:59 -0700 Subject: [PATCH 1/2] Remove genhtml --baseline-file option #36 This was preventing branch coverage in HTML output --- cmake/FindLcov.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmake/FindLcov.cmake b/cmake/FindLcov.cmake index 244d1c2..ebe2340 100644 --- a/cmake/FindLcov.cmake +++ b/cmake/FindLcov.cmake @@ -294,7 +294,6 @@ function (lcov_capture_tgt TNAME) file(MAKE_DIRECTORY ${LCOV_HTML_PATH}/${TNAME}) add_custom_target(${TNAME}-genhtml COMMAND ${GENHTML_BIN} --quiet --sort --prefix ${PROJECT_SOURCE_DIR} - --baseline-file ${LCOV_DATA_PATH_INIT}/${TNAME}.info --output-directory ${LCOV_HTML_PATH}/${TNAME} --title "${CMAKE_PROJECT_NAME} - target ${TNAME}" ${GENHTML_CPPFILT_FLAG} ${OUTFILE} @@ -327,7 +326,6 @@ function (lcov_capture) file(MAKE_DIRECTORY ${LCOV_HTML_PATH}/all_targets) add_custom_target(lcov COMMAND ${GENHTML_BIN} --quiet --sort - --baseline-file ${LCOV_DATA_PATH_INIT}/all_targets.info --output-directory ${LCOV_HTML_PATH}/all_targets --title "${CMAKE_PROJECT_NAME}" --prefix "${PROJECT_SOURCE_DIR}" ${GENHTML_CPPFILT_FLAG} ${OUTFILE} From 45a167906b07a7189e40fba26f23ef4ad64dbd15 Mon Sep 17 00:00:00 2001 From: Arun Date: Tue, 12 Jul 2022 18:09:39 -0700 Subject: [PATCH 2/2] Update test --- src/bar/bar.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bar/bar.c b/src/bar/bar.c index 7ebb3b2..f02c3da 100644 --- a/src/bar/bar.c +++ b/src/bar/bar.c @@ -17,6 +17,12 @@ int main (int argc, char** argv) { + if (argc == 1) + { + printf("Zero arg\n"); + return 0; + } + if (*argv[1] == '1') printf("%d\n", foo()); else if (*argv[1] == '2')