Skip to content

Commit

Permalink
use tools.ps1 helpers to get procdump
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarolf committed Feb 2, 2022
1 parent 3393ecf commit 93298f6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
24 changes: 10 additions & 14 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,19 @@ jobs:
pool:
name: NetCore1ESPool-Public
demands: ImageOverride -equals Build.Windows.Amd64.VS2022.Pre.Open
timeoutInMinutes: 40
timeoutInMinutes: 120

steps:
- checkout: self
clean: true
- task: PowerShell@2
displayName: Download procdump
enabled: true
inputs:
targetType: inline
script: |
mkdir $env:Agent_TempDirectory\procdump
Invoke-WebRequest -Uri https://download.sysinternals.com/files/Procdump.zip -UseBasicParsing -OutFile $env:Agent_TempDirectory\procdump\Procdump.zip | Out-Null
Expand-Archive -Path $env:Agent_TempDirectory\procdump\Procdump.zip $env:Agent_TempDirectory\procdump\
set PROCDUMP_PATH=$env:Agent_TempDirectory\procdump\
Write-Host ##vso[task.setvariable variable=PROCDUMP_PATH;]${env:Agent_TempDirectory}\procdump
Write-Host ##vso[task.setvariable variable=PATH;]${env:Agent_TempDirectory}\procdump;${env:PATH};
- pwsh: eng\scripts\Get-ProcDump.ps1
displayName: Get ProcDump
- pwsh: Write-Host "##vso[task.setvariable variable=PROCDUMP_PATH;]$(Build.SourcesDirectory)\.tools\procdump"
displayName: Set PROCDUMP_PATH Environment Variable
- pwsh: Write-Host "##vso[task.prependpath]$(Build.SourcesDirectory)\.tools\procdump"
displayName: Set PATH Environment Variable
- pwsh: Write-Host "##vso[task.setvariable variable=VSTEST_DUMP_FORCEPROCDUMP;]1"
displayName: Set VSTEST_DUMP_FORCEPROCDUMP Environment Variable
- script: eng\common\cibuild.cmd -configuration $(_configuration) -prepareMachine /p:Coverage=$(_codeCoverage)
displayName: Build and Test
- task: PublishTestResults@2
Expand All @@ -66,7 +62,7 @@ jobs:
displayName: 'Publish Artifact: TestResults'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)'
ArtifactName: 'FullOnWindows $(_configuration) Test Logs'
ArtifactName: 'Windows $(_configuration) Test Logs'
continueOnError: true
condition: always()

Expand Down
1 change: 0 additions & 1 deletion eng/Testing.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --blame-hang-dump-type full</TestRunnerAdditionalArguments>
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --blame-hang-timeout 10min</TestRunnerAdditionalArguments>
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --blame-crash-dump-type full</TestRunnerAdditionalArguments>
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --blame-crash-collect-always</TestRunnerAdditionalArguments>
</PropertyGroup>
</Project>
13 changes: 13 additions & 0 deletions eng/scripts/Get-ProcDump.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<#
.SYNOPSIS
Downloads 32-bit and 64-bit procdump executables and returns the path to where they were installed.
eng\scripts\Get-ProcDump.ps1
#>
. $PSScriptRoot/../common/tools.ps1
$procDumpDir = Join-Path $ToolsDir "procdump"
$procDumpToolPath = Join-Path $procDumpDir "procdump.exe"
if (-not (Test-Path $procDumpToolPath)) {
Invoke-WebRequest -Uri https://download.sysinternals.com/files/Procdump.zip -UseBasicParsing -OutFile $TempDir\Procdump.zip | Out-Null
Expand-Archive -Path $TempDir\Procdump.zip $procDumpDir
}
(Resolve-Path $procDumpDir).Path

0 comments on commit 93298f6

Please sign in to comment.