File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -84,23 +84,24 @@ stages:
8484 sudo ln -s $(pwd)/build/tools/bin/gocov /usr/local/bin/gocov
8585 sudo ln -s $(pwd)/build/tools/bin/gocov-xml /usr/local/bin/gocov-xml
8686
87- sed -i "1d" linux-coverage.out
88- sed -i "1d" windows -coverage.out
87+ GOOS=linux gocov convert linux-coverage.out > linux-coverage.json
88+ GOOS=linux gocov-xml < linux -coverage.json > linux-coverage.xml
8989
90- echo "mode: atomic" > total_ut_coverage.out
91- cat linux-coverage.out >> total_ut_coverage.out
92- cat windows-coverage.out >> total_ut_coverage.out
93-
94- gocov convert total_ut_coverage.out > total_ut_coverage.json
95- gocov-xml < total_ut_coverage.json > total_ut_coverage.xml
90+ GOOS=windows gocov convert windows-coverage.out > windows-coverage.json
91+ GOOS=windows gocov-xml < windows-coverage.json > windows-coverage.xml
92+
93+ mkdir coverage
94+
95+ mv linux-coverage.xml coverage/
96+ mv windows-coverage.xml coverage/
9697 name: "Coverage"
9798 displayName: "Generate Coverage Report"
9899 condition: always()
99100 - task : PublishCodeCoverageResults@2
100101 displayName : " Publish Code Coverage Report"
101102 condition : always()
102103 inputs :
103- summaryFileLocation : total_ut_coverage.xml
104+ summaryFileLocation : coverage/*
104105 - task : BuildQualityChecks@8
105106 displayName : " Check Code Coverage Regression"
106107 condition : always()
You can’t perform that action at this time.
0 commit comments