Skip to content

Commit

Permalink
[azpipeline] Fix gcovr nested directory (sonic-net#1451)
Browse files Browse the repository at this point in the history
sonic-swss-common introduced nested directory in common/c-api
and it causes gcovr to write output file in non existing directory
this fix replaces all / to - for all gcovr output files to be in
the same directory
  • Loading branch information
kcudnik authored and shiraez committed Dec 12, 2024
1 parent 0df8da1 commit 0f62107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ jobs:
gcov_dirs=$(find . -path "*.libs*gcda" | xargs dirname | sort -u | cut -c"3-")
for dir in ${gcov_dirs}; do
source_dir=$(dirname $dir)
output_file="coverage-$source_dir.json"
output_file=$(echo "coverage-$source_dir.json"| tr '/' '-')
gcovr --exclude-unreachable-branches --json-pretty -o $output_file --object-directory $source_dir $dir
done
gcovr -r ./ -e ".*/SAI/.*" -e ".+/json.hpp" -e "swss/.+" -e ".*/.libs/.*" -e ".*/debian/.*" --exclude-unreachable-branches --json-pretty -o coverage-all.json
Expand Down

0 comments on commit 0f62107

Please sign in to comment.