Skip to content

Commit

Permalink
Fix test result publishing (#1244)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbussell authored Apr 25, 2024
1 parent 211b3c3 commit 8fa03e2
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions eng/common/templates/steps/test-images-linux-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,16 @@ steps:
displayName: Docker logout
condition: and(always(), ${{ parameters.condition }})
continueOnError: true
- powershell: |
$hasTestResults = Test-Path $(Common.TestResultsDirectory)/$(testResultsDirectory)
echo "##vso[task.setvariable variable=hasTestResults]$hasTestResults"
if ($hasTestResults) {
docker cp $(testRunner.container):/repo/$(testResultsDirectory) $(Common.TestResultsDirectory)/.
}
else {
echo "There were no test outputs in $(Common.TestResultsDirectory)/$(testResultsDirectory). Skipping test result publishing."
}
- powershell: >
docker cp
$(testRunner.container):/repo/$(testResultsDirectory)
$(Common.TestResultsDirectory)/.
displayName: Copy Test Results
condition: and(always(), ${{ parameters.condition }})
continueOnError: true
- task: PublishTestResults@2
displayName: Publish Test Results
condition: and(always(), ${{ parameters.condition }}, eq(variables['hasTestResults'], 'True'))
condition: and(always(), ${{ parameters.condition }})
continueOnError: true
inputs:
testRunner: vSTest
Expand Down

0 comments on commit 8fa03e2

Please sign in to comment.