Improve Functional Test Stability and CI Reliability #79
13
ci-build.sh
13
ci-build.sh
@@ -259,16 +259,11 @@ build_and_test() {
|
||||
if [ "$run_coverage" = "yes" ]; then
|
||||
echo "--> Collecting coverage data..."
|
||||
if command -v lcov >/dev/null 2>&1; then
|
||||
lcov --capture --directory . --output-file coverage.info \
|
||||
lcov --capture --directory . --output-file coverage-full.info \
|
||||
--rc lcov_branch_coverage=1 --ignore-errors inconsistent 2>&1 || true
|
||||
|
jabber.developer marked this conversation as resolved
Outdated
|
||||
# Remove test files, stubs, system headers - only keep src/ production code
|
||||
lcov --remove coverage.info \
|
||||
'/usr/*' \
|
||||
'*/tests/*' \
|
||||
'*test*.c' \
|
||||
'*stub*.c' \
|
||||
'*/functionaltests/*' \
|
||||
'*/unittests/*' \
|
||||
# Extract only production code from src/ directory, exclude tests
|
||||
# Pattern matches both Docker (/src/src/*) and CI (/usr/src/profanity/src/*)
|
||||
lcov --extract coverage-full.info '*/profanity/src/*' '*/src/src/*' \
|
||||
--output-file coverage.info \
|
||||
--rc lcov_branch_coverage=1 --ignore-errors inconsistent 2>&1 || true
|
||||
|
jabber.developer marked this conversation as resolved
Outdated
jabber.developer
commented
(same as above) Wouldn't it get caught in the error handler declared earlier? (same as above) Wouldn't it get caught in the error handler declared earlier?
jabber.developer2
commented
It is done foe log readability. It is done foe log readability.
|
||||
if [ -f coverage.info ] && [ -s coverage.info ]; then
|
||||
|
||||
Reference in New Issue
Block a user
Wouldn't it get caught in the error handler declared earlier?
It is done foe log readability.