Skip to content

Commit fbd088b

Browse files
authored
Copy CPU profiles generated in tests to logs folder for upload (#8002)
2 parents 09ded44 + a4aa2a3 commit fbd088b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

azure-pipelines/test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ steps:
3333
DISPLAY: :99.0
3434
CODE_VERSION: ${{ parameters.testVSCodeVersion }}
3535

36+
- powershell: |
37+
$tempPath = [System.IO.Path]::GetTempPath()
38+
echo "Temp Path: $tempPath"
39+
Get-ChildItem -Path $tempPath -Filter *.cpuprofile | Copy-Item -Destination "$(Build.SourcesDirectory)/out/logs"
40+
displayName: 'Copy .cpuprofile files to out/logs'
41+
condition: succeededOrFailed()
42+
3643
- task: PublishTestResults@2
3744
condition: succeededOrFailed()
3845
displayName: 'Publish Test Results'
@@ -46,14 +53,14 @@ steps:
4653

4754
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
4855
- task: 1ES.PublishPipelineArtifact@1
49-
condition: failed()
56+
condition: succeededOrFailed()
5057
displayName: 'Upload integration test logs'
5158
inputs:
5259
path: '$(Build.SourcesDirectory)/out/logs'
5360
artifact: 'Test Logs ($(System.StageDisplayName)-$(Agent.JobName)-$(System.JobAttempt))'
5461
- ${{ else }}:
5562
- task: PublishPipelineArtifact@1
56-
condition: failed()
63+
condition: succeededOrFailed()
5764
displayName: 'Upload integration test logs'
5865
inputs:
5966
targetPath: '$(Build.SourcesDirectory)/out/logs'

0 commit comments

Comments
 (0)