Skip to content

Commit 3a24d2d

Browse files
committed
FIX: geninfo_auto_base = 1
1 parent 3c4dbd6 commit 3a24d2d

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

scripts/coverage/coverage_capture.sh

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,26 @@ set -e
77

88
[ "$1" != "" ] && OUTPUT_NAME="$1" || OUTPUT_NAME="total_coverage"
99

10+
COMMON_UMF_DIR=/home/runner/work/unified-memory-framework/unified-memory-framework
11+
12+
# This is ${UMF_DIR}/scripts/coverage/coverage_capture.sh file, so
13+
UMF_DIR=$(realpath $(dirname $0)/../..)
14+
15+
# From the lcovrc(5) manual:
16+
# Adjust path to source files by removing or changing path
17+
# components that match the specified pattern (Perl regular
18+
# expression format)
19+
# geninfo_adjust_src_path = /tmp/build => /usr/src
20+
21+
if [ "$UMF_DIR" != "$COMMON_UMF_DIR" ]; then
22+
echo "geninfo_adjust_src_path = \"s#$UMF_DIR#$COMMON_UMF_DIR#g\"" | tee ${HOME}/.lcovrc
23+
cat ${HOME}/.lcovrc
24+
else
25+
rm ${HOME}/.lcovrc
26+
fi
27+
1028
set -x
1129

12-
# --exclude "*proxy_lib_new_delete.h*"
13-
lcov --capture --directory . --exclude "/usr/*" --exclude "*/build/_deps/*" --exclude "*/examples/*" --exclude "*/test/*" --exclude "*/src/critnib/*" --exclude "*/src/ravl/*" --output-file $OUTPUT_NAME || \
14-
( echo && lcov --capture --directory . --exclude "/usr/*" --exclude "*/build/_deps/*" --exclude "*/examples/*" --exclude "*/test/*" --exclude "*/src/critnib/*" --exclude "*/src/ravl/*" --ignore-errors mismatch,unused --output-file $OUTPUT_NAME )
30+
# --exclude "*proxy_lib_new_delete.h*" --base-directory .. --no-external
31+
lcov --capture --directory . --exclude "/usr/*" --exclude "*/build/_deps/*" --exclude "*/examples/*" --exclude "*/test/*" --exclude "*/src/critnib/*" --exclude "*/src/ravl/*" --output-file $OUTPUT_NAME || \
32+
( echo "RETRY after ERROR !!!:" && lcov --capture --directory . --exclude "/usr/*" --exclude "*/build/_deps/*" --exclude "*/examples/*" --exclude "*/test/*" --exclude "*/src/critnib/*" --exclude "*/src/ravl/*" --ignore-errors mismatch,unused,negative,corrupt --output-file $OUTPUT_NAME )

scripts/coverage/merge_coverage_files.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ done
3737

3838
set -x
3939

40-
lcov -o $OUTPUT_NAME $OPTS
40+
lcov $OPTS -o $OUTPUT_NAME

0 commit comments

Comments
 (0)