From 91a3897879e3ea99d15488e077da7c6bbcdc828f Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Wed, 21 Aug 2024 23:34:26 +0300 Subject: [PATCH 1/2] minor coverage change --- src/rpp/rpp/observables/details/disposable_strategy.hpp | 4 ++-- src/rpp/rpp/observers/details/fwd.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpp/rpp/observables/details/disposable_strategy.hpp b/src/rpp/rpp/observables/details/disposable_strategy.hpp index 00afdba0c..dfcb0cdbb 100644 --- a/src/rpp/rpp/observables/details/disposable_strategy.hpp +++ b/src/rpp/rpp/observables/details/disposable_strategy.hpp @@ -79,7 +79,7 @@ namespace rpp::details::observables concept has_expected_disposable_strategy = requires { typename T::expected_disposable_strategy; }; template - auto* deduce_disposable_strategy() + consteval auto* deduce_disposable_strategy() { if constexpr (has_expected_disposable_strategy) return static_cast(nullptr); @@ -91,7 +91,7 @@ namespace rpp::details::observables concept has_updated_disposable_strategy = requires { typename T::template updated_disposable_strategy; }; template - auto* deduce_updated_disposable_strategy() + consteval auto* deduce_updated_disposable_strategy() { if constexpr (has_updated_disposable_strategy) return static_cast*>(nullptr); diff --git a/src/rpp/rpp/observers/details/fwd.hpp b/src/rpp/rpp/observers/details/fwd.hpp index c9eb936a4..377b9f295 100644 --- a/src/rpp/rpp/observers/details/fwd.hpp +++ b/src/rpp/rpp/observers/details/fwd.hpp @@ -70,7 +70,7 @@ namespace rpp::details::observers namespace details { template - auto* deduce_disposable_strategy() + consteval auto* deduce_disposable_strategy() { if constexpr (has_disposable_strategy) return static_cast(nullptr); From 6b09e1d198be4c27748885ad65817089cedc0a93 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Thu, 22 Aug 2024 00:04:57 +0300 Subject: [PATCH 2/2] add info about qt/grpc --- cmake/coverage.cmake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cmake/coverage.cmake b/cmake/coverage.cmake index 9918fbd35..b68084644 100644 --- a/cmake/coverage.cmake +++ b/cmake/coverage.cmake @@ -5,13 +5,14 @@ if (RPP_USE_LLVM_COV) message( FATAL_ERROR "Expected to set RPP_BUILD_TESTS_TOGETHER flag when build coverage via llvm cov") endif() + set(RPP_COVERAGE_TARGETS -instr-profile=${RPP_TEST_RESULTS_DIR}/results.profdata --object $ --object $ --object $) + add_custom_target( coverage - COMMAND llvm-profdata merge -sparse ${RPP_TEST_RESULTS_DIR}/test_rpp.profraw -o ${RPP_TEST_RESULTS_DIR}/test_rpp.profdata - COMMAND llvm-cov report --ignore-filename-regex=build|tests -instr-profile=${RPP_TEST_RESULTS_DIR}/test_rpp.profdata $ - COMMAND llvm-cov show --ignore-filename-regex=build|tests --show-branches=count --show-expansions --show-line-counts --show-line-counts-or-regions --show-regions --instr-profile=${RPP_TEST_RESULTS_DIR}/test_rpp.profdata $ > ${RPP_TEST_RESULTS_DIR}/coverage.txt - COMMAND llvm-cov show --ignore-filename-regex=build|tests --show-branches=count --show-expansions --show-line-counts --show-line-counts-or-regions --show-regions --instr-profile=${RPP_TEST_RESULTS_DIR}/test_rpp.profdata $ --format=html > ${RPP_TEST_RESULTS_DIR}/coverage.html - # COMMAND llvm-cov export -instr-profile=${RPP_TEST_RESULTS_DIR}/test_rpp.profdata $ > ${RPP_TEST_RESULTS_DIR}/coverage.json + COMMAND llvm-profdata merge -sparse=true ${RPP_TEST_RESULTS_DIR}/test_rpp.profraw ${RPP_TEST_RESULTS_DIR}/test_rppqt.profraw ${RPP_TEST_RESULTS_DIR}/test_rppgrpc.profraw -o ${RPP_TEST_RESULTS_DIR}/results.profdata + + COMMAND llvm-cov report --ignore-filename-regex=build|tests ${RPP_COVERAGE_TARGETS} + COMMAND llvm-cov show --ignore-filename-regex=build|tests --show-branches=count --show-expansions --show-line-counts --show-line-counts-or-regions --show-regions ${RPP_COVERAGE_TARGETS} > ${RPP_TEST_RESULTS_DIR}/coverage.txt COMMENT "Generating coverage report" VERBATIM )