Skip to content

Commit

Permalink
Merge branch 'v2' into retry_when
Browse files Browse the repository at this point in the history
  • Loading branch information
victimsnino authored Aug 22, 2024
2 parents 4939c91 + 0ea16c2 commit 523330c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/analyzers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ jobs:
override_branch: ${{ github.event.workflow_run.head_branch }}
override_pr: ${{ steps.source-run-info.outputs.pullRequestNumber }}
override_commit: ${{ github.event.workflow_run.head_sha }}
token: ${{ secrets.CODECOV_TOKEN }} # required

- name: Run sonar-scanner on PUSH
if: github.event.workflow_run.event == 'push'
Expand Down
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

0 comments on commit 523330c

Please sign in to comment.