Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions cmake/coverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<TARGET_FILE:test_rpp> --object $<TARGET_FILE:test_rppqt> --object $<TARGET_FILE:test_rppgrpc>)

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 $<TARGET_FILE:test_rpp>
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 $<TARGET_FILE:test_rpp> > ${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 $<TARGET_FILE:test_rpp> --format=html > ${RPP_TEST_RESULTS_DIR}/coverage.html
# COMMAND llvm-cov export -instr-profile=${RPP_TEST_RESULTS_DIR}/test_rpp.profdata $<TARGET_FILE:test_rpp> > ${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
)
Expand Down
4 changes: 2 additions & 2 deletions src/rpp/rpp/observables/details/disposable_strategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ namespace rpp::details::observables
concept has_expected_disposable_strategy = requires { typename T::expected_disposable_strategy; };

template<typename T>
auto* deduce_disposable_strategy()
consteval auto* deduce_disposable_strategy()
{
if constexpr (has_expected_disposable_strategy<T>)
return static_cast<typename T::expected_disposable_strategy*>(nullptr);
Expand All @@ -91,7 +91,7 @@ namespace rpp::details::observables
concept has_updated_disposable_strategy = requires { typename T::template updated_disposable_strategy<Prev>; };

template<typename T, typename Prev>
auto* deduce_updated_disposable_strategy()
consteval auto* deduce_updated_disposable_strategy()
{
if constexpr (has_updated_disposable_strategy<T, Prev>)
return static_cast<typename T::template updated_disposable_strategy<Prev>*>(nullptr);
Expand Down
2 changes: 1 addition & 1 deletion src/rpp/rpp/observers/details/fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace rpp::details::observers
namespace details
{
template<typename T>
auto* deduce_disposable_strategy()
consteval auto* deduce_disposable_strategy()
{
if constexpr (has_disposable_strategy<T>)
return static_cast<typename T::preferred_disposable_strategy*>(nullptr);
Expand Down