diff --git a/.azure-pipelines/gcov.yml b/.azure-pipelines/gcov.yml index 27129c5611..9bce6feccd 100644 --- a/.azure-pipelines/gcov.yml +++ b/.azure-pipelines/gcov.yml @@ -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) diff --git a/tests/gcov_support.sh b/tests/gcov_support.sh index 94e2b6aba1..8582d5899d 100755 --- a/tests/gcov_support.sh +++ b/tests/gcov_support.sh @@ -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