Skip to content

Commit 970c17f

Browse files
committed
FIX: geninfo_auto_base = 1
1 parent 45e81e8 commit 970c17f

File tree

2 files changed

+41
-28
lines changed

2 files changed

+41
-28
lines changed

scripts/coverage/coverage_capture.sh

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,39 @@ set -e
99

1010
set -x
1111

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 )
12+
lcov --capture --directory . \
13+
--exclude "/usr/*" \
14+
--exclude "*/build/*" \
15+
--exclude "*/benchmark/*" \
16+
--exclude "*/examples/*" \
17+
--exclude "*/test/*" \
18+
--exclude "*/src/critnib/*" \
19+
--exclude "*/src/ravl/*" \
20+
--exclude "*proxy_lib_new_delete.h" \
21+
--output-file $OUTPUT_NAME || \
22+
( echo "RETRY after ERROR !!!:" && \
23+
lcov --capture --directory . \
24+
--exclude "/usr/*" \
25+
--exclude "*/build/*" \
26+
--exclude "*/benchmark/*" \
27+
--exclude "*/examples/*" \
28+
--exclude "*/test/*" \
29+
--exclude "*/src/critnib/*" \
30+
--exclude "*/src/ravl/*" \
31+
--exclude "*proxy_lib_new_delete.h" \
32+
--ignore-errors mismatch,unused,negative,corrupt \
33+
--output-file $OUTPUT_NAME )
34+
35+
# Most common UMF source code directory on most GH CI runners
36+
COMMON_UMF_DIR=/home/runner/work/unified-memory-framework/unified-memory-framework
37+
38+
# Get the current UMF source code directory
39+
# This is ${CURRENT_UMF_DIR}/scripts/coverage/coverage_capture.sh file, so
40+
CURRENT_UMF_DIR=$(realpath $(dirname $0)/../..)
41+
42+
# Coverage (lcov) has to be run in the same directory on all runners:
43+
# /home/runner/work/unified-memory-framework/unified-memory-framework/build
44+
# to be able to merge all results, so we have to replace the paths if they are different:
45+
if [ "$CURRENT_UMF_DIR" != "$COMMON_UMF_DIR" ]; then
46+
sed -i "s|$CURRENT_UMF_DIR|$COMMON_UMF_DIR|g" $OUTPUT_NAME
47+
fi

scripts/coverage/merge_coverage_files.sh

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,15 @@
66
[ "$1" != "" ] && PREFIX="$1" || PREFIX="exports-coverage"
77
[ "$2" != "" ] && OUTPUT_NAME="$2" || OUTPUT_NAME="total_coverage"
88

9-
GROUP=$(groups | cut -d' ' -f1)
10-
11-
# The source code of UMF is located in /home/runner/work/unified-memory-framework/unified-memory-framework.
12-
UMF_DIR=/home/runner/work/unified-memory-framework/unified-memory-framework
13-
14-
# Create required links:
15-
# LINKS="
16-
# /home/testuser
17-
# /home/test-user/actions-runner/_work/unified-memory-framework/unified-memory-framework
18-
# /home/test-user/shared-action-runner/_work/unified-memory-framework/unified-memory-framework
19-
# /home/test-user/shared-actions-runner/_work/unified-memory-framework/unified-memory-framework
20-
# /opt/actions-runner/_work/unified-memory-framework/unified-memory-framework"
21-
cat ./path-* | sort | uniq
22-
LINKS=$(cat ./path-* | sort | uniq | xargs)
23-
24-
for link in $LINKS; do
25-
[ -e $link ] && continue # continue if already exists
26-
sudo mkdir -p $link # create all subdirectories
27-
sudo rm -r $link # remove the last directory
28-
sudo ln -s $UMF_DIR $link # create the link
29-
sudo chown $USER:$GROUP $link # set permissions
30-
ls -al $link # check the link
31-
done
32-
339
OPTS=""
3410
for file in $(ls -1 ${PREFIX}-*); do
3511
OPTS="$OPTS -a $file"
3612
done
3713

3814
set -x
3915

40-
lcov -o $OUTPUT_NAME $OPTS
16+
lcov $OPTS -o $OUTPUT_NAME || \
17+
( echo "RETRY after ERROR !!!:" && \
18+
lcov $OPTS \
19+
--ignore-errors mismatch,unused,negative,corrupt \
20+
--output-file $OUTPUT_NAME )

0 commit comments

Comments
 (0)