-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade the lcov version in github ci #311
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ set -e | |
set -x | ||
|
||
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
ROOT_DIR="${SCRIPTS_DIR}/../" | ||
ROOT_DIR="$( cd "${SCRIPTS_DIR}/../" && pwd )" | ||
PARENT_DIR="$( cd "${ROOT_DIR}/../" && pwd )" | ||
|
||
COVERAGE_DIR="${ROOT_DIR}/coverage" | ||
if [ -d "${COVERAGE_DIR}" ]; then | ||
|
@@ -13,17 +14,25 @@ else | |
mkdir -p "${COVERAGE_DIR}" | ||
fi | ||
|
||
pushd "${PARENT_DIR}" | ||
lcov --rc branch_coverage=1 \ | ||
--rc geninfo_unexecuted_blocks=1 \ | ||
--parallel 8 \ | ||
--directory . \ | ||
--directory vsag \ | ||
--capture \ | ||
--substitute "s#${PARENT_DIR}/##g" \ | ||
--ignore-errors mismatch,mismatch \ | ||
--ignore-errors count,count \ | ||
--output-file ${COVERAGE_DIR}/coverage.info | ||
|
||
lcov --remove ${COVERAGE_DIR}/coverage.info '/usr/*' '*/build/*' '*/vsag/tests/*' --ignore-errors inconsistent,inconsistent --output-file ${COVERAGE_DIR}/coverage.info | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to check the coverage under the tools directory? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we just run unittest and functest in CI, so there is no coverage result about the codes in tools/ |
||
lcov --list ${COVERAGE_DIR}/coverage.info --ignore-errors inconsistent,inconsistent | ||
lcov --remove ${COVERAGE_DIR}/coverage.info \ | ||
'/usr/*' \ | ||
'vsag/build/*' \ | ||
'vsag/tests/*' \ | ||
--ignore-errors inconsistent,inconsistent \ | ||
--output-file ${COVERAGE_DIR}/coverage.info | ||
lcov --list ${COVERAGE_DIR}/coverage.info \ | ||
--ignore-errors inconsistent,inconsistent | ||
popd | ||
|
||
pushd "${COVERAGE_DIR}" | ||
coverages=$(ls coverage.info) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok,Here change root source path ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, use the relative path instead, the origin result uses the absolute path which makes the vsag/ directory deeper and meaningless in the pages of codecov.io