diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index b5f5f9f..6df315b 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -35,8 +35,7 @@ jobs: - name: Install dependencies run: | - vcpkg integrate install - vcpkg install + make dependencies - name: Install sonar-scanner and build-wrapper uses: sonarsource/sonarcloud-github-c-cpp@v3 diff --git a/.lcovrc b/.lcovrc index fc5c018..1b9cc29 100644 --- a/.lcovrc +++ b/.lcovrc @@ -62,12 +62,45 @@ genhtml_function_coverage = 1 # Adjust test names if non-zero #geninfo_adjust_testname = 0 +# Location of the gcov tool +#geninfo_gcov_tool = gcov + +# Adjust test names if non-zero +#geninfo_adjust_testname = 0 + # Calculate a checksum for each line if non-zero geninfo_checksum = 0 # Enable libtool compatibility mode if non-zero geninfo_compat_libtool = 0 +# Specify whether to capture coverage data for external source +# files +#geninfo_external = 1 + +# Use gcov's --all-blocks option if non-zero +#geninfo_gcov_all_blocks = 1 + +# Specify compatiblity modes (same as --compat option +# of geninfo) +#geninfo_compat = libtool=on, hammer=auto, split_crc=auto + +# Adjust path to source files by removing or changing path +# components that match the specified pattern (Perl regular +# expression format) +#geninfo_adjust_src_path = /tmp/build => /usr/src + +# Specify if geninfo should try to automatically determine +# the base-directory when collecting coverage data. +geninfo_auto_base = 1 + +# Use gcov intermediate format? Valid values are 0, 1, auto +geninfo_intermediate = auto + +# Specify whether to exclude exception branches from branch coverage. +# Default is 0. +geninfo_no_exception_branch = 1 + # Directory containing gcov kernel files lcov_gcov_dir = /proc/gcov @@ -82,3 +115,31 @@ lcov_rmmod_tool = /sbin/rmmod # Location for temporary directories lcov_tmp_dir = /tmp + +# Show full paths during list operation if non-zero +lcov_list_full_path = 1 + +# Specify the maximum width for list output. This value is +# ignored when lcov_list_full_path is non-zero. +lcov_list_width = 80 + +# Specify the maximum percentage of file names which may be +# truncated when choosing a directory prefix in list output. +# This value is ignored when lcov_list_full_path is non-zero. +lcov_list_truncate_max = 20 + +# Specify if function coverage data should be collected and +# processed. +lcov_function_coverage = 1 + +# Specify if branch coverage data should be collected and +# processed. +lcov_branch_coverage = 1 + +# Ask LCOV to return non-zero exit code if line coverage is +# below specified threshold percentage. +; lcov_fail_under_lines = 97.5 + +# Specify JSON module to use, or choose best available if +# set to auto +lcov_json_module = auto diff --git a/CMakeLists.txt b/CMakeLists.txt index 360ebbd..ea88d32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ include(CTest) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED on) +set(VCPKG_MANIFEST_INSTALL OFF) SET(GCC_COVERAGE_COMPILE_FLAGS "-fsanitize=address -fprofile-arcs -ftest-coverage -g -O0") SET(GCC_COVERAGE_LINK_FLAGS "--coverage") diff --git a/Makefile b/Makefile index 0c8ddb8..318785b 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ BUILDKIT_PROGRESS=plain DOCKER_COMPOSE=docker compose # TOOLS -COVERAGE_TOOL_OPTS=--config-file .lcovrc --rc branch_coverage=1 +COVERAGE_TOOL_OPTS=--config-file .lcovrc # C++ specific SRC_DIR = src