Skip to content

Commit

Permalink
Change base directory referenced in coverage.xml (sonic-net#2976)
Browse files Browse the repository at this point in the history
* [gcov]: Fix directory prefix issue for
  • Loading branch information
theasianpianist authored Dec 7, 2023
1 parent 920959c commit a1ce21f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .azure-pipelines/gcov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ jobs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(Build.ArtifactStagingDirectory)/gcov_output/AllMergeReport/coverage.xml'
reportDirectory: '$(Build.ArtifactStagingDirectory)/gcov_output/AllMergeReport/'
pathToSources: '$(Build.SourcesDirectory)'
failIfCoverageEmpty: true
displayName: 'Publish c c++ test coverage'
condition: eq('${{ parameters.archive_gcov }}', true)

4 changes: 2 additions & 2 deletions tests/gcov_support.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ lcov_merge_all()
cp $1/lcov_cobertura.py $1/common_work/gcov/
python $1/common_work/gcov/lcov_cobertura.py total.info -o coverage.xml

sed -i "s#../../__w/1/s/##" coverage.xml
sed -i "s#......__w.1.s.##" coverage.xml
sed -i "s#\.\./s/##" coverage.xml
sed -i "s#\.\.\.s\.##" coverage.xml

cd gcov_output/
if [ ! -d ${ALLMERGE_DIR} ]; then
Expand Down

0 comments on commit a1ce21f

Please sign in to comment.