|
9 | 9 |
|
10 | 10 | set -x |
11 | 11 |
|
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 |
0 commit comments