This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch code_coverage_v2
in repository https://gitbox.apache.org/repos/asf/tsfile.git
The following commit(s) were added to refs/heads/code_coverage_v2 by this push:
new b76cf1c6 try
b76cf1c6 is described below
commit b76cf1c66a0fea77f31b857c7a556b0a6f2c6efe
Author: HTHou <[email protected]>
AuthorDate: Thu Aug 1 12:20:14 2024 +0800
try
---
.github/workflows/code-coverage.yml | 1 +
cpp/test/CMakeLists.txt | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/code-coverage.yml
b/.github/workflows/code-coverage.yml
index deda813a..9244cf91 100644
--- a/.github/workflows/code-coverage.yml
+++ b/.github/workflows/code-coverage.yml
@@ -27,6 +27,7 @@ jobs:
restore-keys: ${{ runner.os }}-m2-
- name: Test
run: |
+ sudo apt-get install lcov
./mvnw -B -P with-cpp,with-code-coverage clean verify
ll cpp/target/build/test
# - name: Upload coverage reports to codecov
diff --git a/cpp/test/CMakeLists.txt b/cpp/test/CMakeLists.txt
index 6091e9ac..df6d3015 100644
--- a/cpp/test/CMakeLists.txt
+++ b/cpp/test/CMakeLists.txt
@@ -76,7 +76,7 @@ file(GLOB_RECURSE TEST_SRCS
)
if (${COV_ENABLED})
message("Enable code cov...")
- add_compile_options(-fprofile-instr-generate -fcoverage-mapping)
+ add_compile_options(-fprofile-arcs -ftest-coverage)
endif ()
add_executable(TsFile_Test ${TEST_SRCS})