From 2d2654f0d4dbac390031dbf77dd3d2a38dc42f8c Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Mon, 16 Sep 2024 16:22:12 -0300 Subject: [PATCH 1/3] [CONFIG] How to stop vcpkg manifest mode from updating dependencies? https://stackoverflow.com/a/78126733/6366150 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) 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") From 89bc4b4bfee7155675af0c300c91c19c4bc9c1ef Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Mon, 16 Sep 2024 16:24:26 -0300 Subject: [PATCH 2/3] [BUGFIX] [CONFIG] [Github Actions] /usr/local/share/vcpkg/.vcpkg-root: error: Failed to take the filesystem lock Device or resource busy https://github.com/microsoft/vcpkg/issues/22129#issuecomment-998467949 --- .github/workflows/sonarcloud.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 From 32cc34a8d367172db92d1504d7b6db25d08db354 Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Mon, 16 Sep 2024 16:26:36 -0300 Subject: [PATCH 3/3] [CONFIG] lcov, complete lcovrc file. --- .lcovrc | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 62 insertions(+), 1 deletion(-) 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/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