File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 95
95
**/TestOutput/**/*
96
96
**/*.trx
97
97
targetFolder : $(Build.ArtifactStagingDirectory)
98
+ - task : CopyFiles@2
99
+ displayName : Stage process dump and pdb if any
100
+ condition : not(succeeded())
101
+ inputs :
102
+ sourceFolder : $(Build.SourcesDirectory)
103
+ contents : |
104
+ CrashDumps/*.dmp
105
+ bin/**/*.pdb
106
+ targetFolder : $(Build.ArtifactStagingDirectory)
98
107
- task : PublishBuildArtifacts@1
99
108
displayName : Publish build and test logs
100
109
condition : not(succeeded())
Original file line number Diff line number Diff line change @@ -59,6 +59,14 @@ if exist "%DOTNET_CMD%" goto :afterdotnetrestore
59
59
60
60
if NOT exist " %DOTNET_PATH% " mkdir " %DOTNET_PATH% "
61
61
62
+ :: set registry to take dump automatically when test process crashes
63
+ if NOT [%AGENT_ID% ] == [] (
64
+ reg add " HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\LocalDumps"
65
+ reg add " HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\LocalDumps" /v DumpType /t REG_DWORD /d 2
66
+ reg add " HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\LocalDumps" /v DumpCount /t REG_DWORD /d 2
67
+ reg add " HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\LocalDumps" /v DumpFolder /t REG_SZ /d " %~dp0 CrashDumps"
68
+ )
69
+
62
70
:: install the extra runtime first, so the SDK install will overwrite the root dotnet executable
63
71
echo Installing dotnet runtime %DOTNET_EXTRA_RUNTIME_VERSION% ...
64
72
set DOTNET_EXTRA_RUNTIME_ZIP_NAME = dotnet-runtime-%DOTNET_EXTRA_RUNTIME_VERSION% -win-%ARCH% .zip
You can’t perform that action at this time.
0 commit comments