From f1fa4c7bdc2c67a4ef9c476ba9e0e2de6b589bc5 Mon Sep 17 00:00:00 2001
From: jikai <jikai11@huawei.com>
Date: Thu, 14 Dec 2023 10:49:26 +0800
Subject: [PATCH 60/65] remove /var/* in coverage and fix build/test remove

Signed-off-by: jikai <jikai11@huawei.com>
---
 CI/generate_gcov.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/CI/generate_gcov.sh b/CI/generate_gcov.sh
index 76bf382b..7518c5c1 100755
--- a/CI/generate_gcov.sh
+++ b/CI/generate_gcov.sh
@@ -29,10 +29,8 @@ cp -r ~/build $ISULAD_COPY_PATH
 cd $ISULAD_COPY_PATH/build
 ctest
 lcov --directory . --capture --output-file coverage.info --rc lcov_branch_coverage=1
-# Remove std/build files
-lcov --remove coverage.info '/usr/*' -o coverage.info --rc lcov_branch_coverage=1
-lcov --remove coverage.info "$ISULAD_SRC_PATH/build/*" -o coverage.info --rc lcov_branch_coverage=1
-lcov --remove coverage.info "$ISULAD_SRC_PATH/test/*" -o coverage.info --rc lcov_branch_coverage=1
+# extract src only files
+lcov --extract coverage.info '*/iSulad/src/*' -o coverage.info --rc lcov_branch_coverage=1
 
 # Generate html
 genhtml --ignore-errors source -o $GCOV_RESULT_PATH/coverage coverage.info --branch-coverage --rc lcov_branch_coverage=1
-- 
2.42.0

