From 74ee05e13fe4a6a653311656c16664cf142d9a20 Mon Sep 17 00:00:00 2001
From: jikai <jikai11@huawei.com>
Date: Thu, 14 Dec 2023 10:54:27 +0800
Subject: [PATCH 178/181] 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 2f3228df..8d0b5d21 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
-# Remove std/build files
-lcov --remove coverage.info '/usr/*' -o coverage.info
-lcov --remove coverage.info "$ISULAD_SRC_PATH/build/*"
-lcov --remove coverage.info "$ISULAD_SRC_PATH/test/*"
+# extract src only files
+lcov --extract coverage.info '*/iSulad/src/*' -o coverage.info
 
 # Generate html
 genhtml --ignore-errors source -o $GCOV_RESULT_PATH/coverage coverage.info
-- 
2.42.0

