Skip to content

Commit

Permalink
Rearrange docker copy and test results check commands
Browse files Browse the repository at this point in the history
  • Loading branch information
lbussell committed Apr 17, 2024
1 parent 3d4a494 commit d757acf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions eng/common/templates/steps/test-images-linux-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,11 @@ steps:
condition: and(always(), ${{ parameters.condition }})
continueOnError: true
- powershell: |
$hasTestResults = Test-Path $(Common.TestResultsDirectory)/$(testResultsDirectory)
$ErrorActionPreference = 'SilentlyContinue'
docker cp $(testRunner.container):/repo/$(testResultsDirectory) $(Common.TestResultsDirectory)/.
$hasTestResults = Test-Path $(Common.TestResultsDirectory)
echo "##vso[task.setvariable variable=hasTestResults]$hasTestResults"
if ($hasTestResults) {
docker cp $(testRunner.container):/repo/$(testResultsDirectory) $(Common.TestResultsDirectory)/.
}
else {
if (!$hasTestResults) {
echo "There were no test outputs in $(Common.TestResultsDirectory)/$(testResultsDirectory). Skipping test result publishing."
}
displayName: Copy Test Results
Expand Down

0 comments on commit d757acf

Please sign in to comment.