|
@@ -208,6 +208,17 @@ if $time; then
|
|
|
done
|
|
|
printf "$output" | sort -n
|
|
|
fi
|
|
|
+
|
|
|
+generateCoverageFunctions() {
|
|
|
+ #allowlist_fun:.*
|
|
|
+ ignore=$(cat ./ignoredCoverageFunctions)
|
|
|
+ list=$(nm ./build_debug/libcore.a -j | grep "^[a-zA-Z]")
|
|
|
+ for file in $ignore; do
|
|
|
+ list=$(echo "$list" | grep -v $file)
|
|
|
+ done
|
|
|
+ echo "$list" | sed 's/^/allowlist_fun:/g' > build_debug/coverageFunctions
|
|
|
+}
|
|
|
+
|
|
|
if $coverage; then
|
|
|
if [ $compiler = "gcc" ]; then
|
|
|
gcovr -r . build_debug -e test -e performance \
|
|
@@ -215,6 +226,7 @@ if $coverage; then
|
|
|
else
|
|
|
files=$(find build_debug -name *.profraw)
|
|
|
llvm-profdata-16 merge -sparse $files -o build_debug/default.profdata
|
|
|
- llvm-cov-16 show ./build_debug/test -instr-profile=build_debug/default.profdata --ignore-filename-regex="test/" -line-coverage-lt=100
|
|
|
+ generateCoverageFunctions
|
|
|
+ llvm-cov-16 show ./build_debug/test -instr-profile=build_debug/default.profdata --ignore-filename-regex="test/" -line-coverage-lt=100 --name-allowlist=build_debug/coverageFunctions
|
|
|
fi
|
|
|
fi
|