Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collect crash dump, upload dump and pdb to artifact #4666

Merged
merged 2 commits into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions build/ci/job-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ jobs:
**/TestOutput/**/*
**/*.trx
targetFolder: $(Build.ArtifactStagingDirectory)
- task: CopyFiles@2
displayName: Stage process dump and pdb if any
condition: not(succeeded())
inputs:
sourceFolder: $(Build.SourcesDirectory)
contents: |
CrashDumps/*.dmp
bin/**/*.pdb
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: Publish build and test logs
condition: not(succeeded())
Expand Down
6 changes: 6 additions & 0 deletions init-tools.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ if exist "%DOTNET_CMD%" goto :afterdotnetrestore

if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"

:: set registry to take dump automatically when test process crashes
sharwell marked this conversation as resolved.
Show resolved Hide resolved
powershell -Command "New-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting' -Name 'LocalDumps' -Force"
powershell -Command "New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpFolder' -Value '%~dp0CrashDumps' -PropertyType 'ExpandString' -Force"
:: take full dump
powershell -Command "New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpType' -Value 2 -PropertyType DWord -Force"
sharwell marked this conversation as resolved.
Show resolved Hide resolved
sharwell marked this conversation as resolved.
Show resolved Hide resolved

:: install the extra runtime first, so the SDK install will overwrite the root dotnet executable
echo Installing dotnet runtime %DOTNET_EXTRA_RUNTIME_VERSION%...
set DOTNET_EXTRA_RUNTIME_ZIP_NAME=dotnet-runtime-%DOTNET_EXTRA_RUNTIME_VERSION%-win-%ARCH%.zip
Expand Down