From 1c95e12b0dd2b4902a289328e8e54fde6eed0623 Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Wed, 21 Jun 2023 23:14:38 -0400 Subject: tests docs: fix lcov code coverage report generation - Updated/rebased version of https://gerrit.fd.io/r/c/vpp/+/34199 Type: test Change-Id: I43913ecfd11a4578bdb10c4be76253fe38d57976 Signed-off-by: Nathan Skrzypczak Signed-off-by: Dave Wallace --- src/CMakeLists.txt | 1 + src/vlib/unix/main.c | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fb4463e332e..b6d48f5b5ea 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -127,6 +127,7 @@ elseif (${CMAKE_BUILD_TYPE_LC} MATCHES "coverity") elseif (${CMAKE_BUILD_TYPE_LC} MATCHES "gcov") add_compile_options(-O0 -fprofile-arcs -ftest-coverage) add_compile_definitions(CLIB_DEBUG CLIB_GCOV) + link_libraries(gcov) endif() set(BUILD_TYPES release debug coverity gcov) diff --git a/src/vlib/unix/main.c b/src/vlib/unix/main.c index 74ad19ebbc2..f09a537a48d 100644 --- a/src/vlib/unix/main.c +++ b/src/vlib/unix/main.c @@ -145,17 +145,6 @@ unix_signal_handler (int signum, siginfo_t * si, ucontext_t * uc) break; } -#ifdef CLIB_GCOV - /* - * Test framework sends SIGTERM, so we need to flush the - * code coverage stats here. - */ - { - void __gcov_flush (void); - __gcov_flush (); - } -#endif - /* Null terminate. */ vec_add1 (syslog_msg, 0); -- cgit 1.2.3-korg