@@ -50,6 +50,7 @@ stages:
5050 ls -la "$REPORT_DIR"
5151 mv coverage-all.out "$COVERAGE_OUT"
5252 ls -la "$REPORT_DIR"
53+ echo "##vso[task.setvariable variable=LINUX_COVERAGE_OUT;isOutput=true]$(cat $REPORT_DIR/linux-coverage.xml)"
5354 retryCountOnTaskFailure: 3
5455 displayName: "Run Unit Tests - Linux"
5556 #workingDirectory: $(ACN_DIR)
@@ -67,17 +68,19 @@ stages:
6768
6869 $GOCOV_BIN convert "$COVERAGE_OUT" > "$REPORT_DIR"/linux-coverage.json
6970 $GOCOV_XML_BIN < "$REPORT_DIR"/linux-coverage.json > "$REPORT_DIR"/linux-coverage.gocov.xml
71+
72+ echo "##vso[task.setvariable variable=LINUX_GOCOV_OUT;isOutput=true]$(cat $REPORT_DIR/linux-coverage.gocov.xml)"
7073 displayName: "Generate Test Reporting"
7174 #workingDirectory: $(ACN_DIR)
7275
73- - task : PublishPipelineArtifact@1
74- displayName : " \U0001F512 Publish to Pipeline Artifact"
75- target :
76- container : host
77- condition : eq('True', 'True')
78- inputs :
79- artifactName : drop_unittest_linux
80- targetPath : $(Build.ArtifactStagingDirectory)/linux-unittest
76+ # - task: PublishPipelineArtifact@1
77+ # displayName: "\U0001F512 Publish to Pipeline Artifact"
78+ # target:
79+ # container: host
80+ # condition: eq('True', 'True')
81+ # inputs:
82+ # artifactName: drop_unittest_linux
83+ # targetPath: $(Build.ArtifactStagingDirectory)/linux-unittest
8184
8285
8386 - job : windows
@@ -151,6 +154,7 @@ stages:
151154 # List files in report directory again
152155 Get-ChildItem -Path $env:REPORT_DIR -Force | Select-Object -ExpandProperty FullName | ForEach-Object { Write-Host $_ }
153156
157+ echo "##vso[task.setvariable variable=WIN_COVERAGE_OUT;isOutput=true]$(cat $env:REPORT_DIR/windows-coverage.xml)"
154158 retryCountOnTaskFailure: 3
155159 displayName: "Run Unit Tests - Windows"
156160 #workingDirectory: $(ACN_DIR)
@@ -177,17 +181,19 @@ stages:
177181
178182 & Invoke-Expression $env:GOCOV_BIN convert $env:COVERAGE_OUT | Out-File -FilePath (Join-Path -Path $env:REPORT_DIR -ChildPath "windows-coverage.json")
179183 & Invoke-Expression $env:GOCOV_XML_BIN < (Join-Path -Path $env:REPORT_DIR -ChildPath "windows-coverage.json") | Out-File -FilePath (Join-Path -Path $env:REPORT_DIR -ChildPath "windows-coverage.gocov.xml")
184+
185+ echo "##vso[task.setvariable variable=WIN_GOCOV_OUT;isOutput=true]$(cat $env:REPORT_DIR/windows-coverage.gocov.xml)"
180186 displayName: "Generate Test Reporting"
181187 #workingDirectory: $(ACN_DIR)
182188
183- - task : PublishPipelineArtifact@1
184- displayName : " \U0001F512 Publish to Pipeline Artifact"
185- target :
186- container : host
187- condition : eq('True', 'True')
188- inputs :
189- artifactName : drop_unittest_windows
190- targetPath : $(Build.ArtifactStagingDirectory)/linux-unittest
189+ # - task: PublishPipelineArtifact@1
190+ # displayName: "\U0001F512 Publish to Pipeline Artifact"
191+ # target:
192+ # container: host
193+ # condition: eq('True', 'True')
194+ # inputs:
195+ # artifactName: drop_unittest_windows
196+ # targetPath: $(Build.ArtifactStagingDirectory)/linux-unittest
191197
192198
193199 - job : coverage
@@ -200,19 +206,20 @@ stages:
200206 type : linux
201207 variables :
202208 ob_outputDirectory : $(Build.ArtifactStagingDirectory)/out
209+
210+ LINUX_COVERAGE_OUT : $(LINUX_COVERAGE_OUT)
211+ LINUX_GOCOV_OUT : $(LINUX_GOCOV_OUT)
212+ WIN_COVERAGE_OUT : $(WIN_COVERAGE_OUT)
213+ WIN_GOCOV_OUT : $(WIN_GOCOV_OUT)
203214 steps :
204215 - script : |
205- mkdir coverage
206-
207- - task : DownloadPipelineArtifact@2
208- inputs :
209- artifact : drop_unittest_linux
210- targetPath : coverage
211-
212- - task : DownloadPipelineArtifact@2
213- inputs :
214- artifact : drop_unittest_windows
215- targetPath : coverage
216+ mkdir "$COV_DIR"
217+ echo "$LINUX_COVERAGE_OUT" > "$COV_DIR"/linux-coverage.xml
218+ echo "$LINUX_GOCOV_OUT" > "$COV_DIR"/linux-coverage.gocov.xml
219+ echo "$WIN_COVERAGE_OUT" > "$COV_DIR"/windows-coverage.xml
220+ echo "$WIN_GOCOV_OUT" > "$COV_DIR"/windows-coverage.gocov.xml
221+ env:
222+ COV_DIR: $(Build.ArtifactStagingDirectory)/coverage
216223
217224 - task : PublishTestResults@2
218225 displayName : " Publish Test Results"
0 commit comments