Skip to content
代码片段 群组 项目
未验证 提交 a936d778 编辑于 作者: BrennanConroy's avatar BrennanConroy 提交者: GitHub
浏览文件

Automatically capture crashdumps for C++ client tests (#7940)

上级 b6216b61
No related branches found
No related tags found
无相关合并请求
...@@ -297,6 +297,12 @@ jobs: ...@@ -297,6 +297,12 @@ jobs:
beforeBuild: beforeBuild:
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1" - powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
displayName: Setup IISExpress test certificates and schema displayName: Setup IISExpress test certificates and schema
- powershell: "& ./.azure/pipelines/tools/SetupTestEnvironment.ps1 Setup signalrclienttests.exe"
displayName: Start AppVerifier
afterBuild:
- powershell: "& ./.azure/pipelines/tools/SetupTestEnvironment.ps1 Shutdown signalrclienttests.exe"
displayName: Stop AppVerifier
condition: always()
artifacts: artifacts:
- name: Windows_Test_Logs - name: Windows_Test_Logs
path: artifacts/logs/ path: artifacts/logs/
......
...@@ -14,4 +14,11 @@ jobs: ...@@ -14,4 +14,11 @@ jobs:
agentOs: Windows agentOs: Windows
jobName: SignalRDailyTests jobName: SignalRDailyTests
jobDisplayName: "SignalR Daily Tests" jobDisplayName: "SignalR Daily Tests"
beforeBuild:
- powershell: "& ./.azure/pipelines/tools/SetupTestEnvironment.ps1 Setup signalrclienttests.exe"
displayName: Start AppVerifier
afterBuild:
- powershell: "& ./.azure/pipelines/tools/SetupTestEnvironment.ps1 Shutdown signalrclienttests.exe"
displayName: Stop AppVerifier
condition: always()
param($Mode) param(
[string]$Mode,
# TEMP TEMP TEMP [string[]]$exes
# While doing https://github.com/aspnet/AspNetCore/pull/5705 I accidentally disabled ANCM on CI machines using )
# the registy key. Remove it to allow tests to pass
Remove-Item "HKLM:\SOFTWARE\Microsoft\IIS Extensions\IIS AspNetCore Module V2\Parameters" -ErrorAction Ignore;
if (!($DumpFolder)) if (!($DumpFolder))
{ {
$DumpFolder = "$PSScriptRoot\..\..\..\..\artifacts\logs\dumps" $DumpFolder = "$PSScriptRoot\..\..\..\artifacts\logs\dumps"
} }
if (!(Test-Path $DumpFolder)) if (!(Test-Path $DumpFolder))
{ {
...@@ -16,17 +13,9 @@ if (!(Test-Path $DumpFolder)) ...@@ -16,17 +13,9 @@ if (!(Test-Path $DumpFolder))
} }
$DumpFolder = Resolve-Path $DumpFolder $DumpFolder = Resolve-Path $DumpFolder
$LogsFolder = "$PSScriptRoot\..\artifacts\logs"
if (!(Test-Path $LogsFolder))
{
New-Item $LogsFolder -ItemType Directory;
}
$LogsFolder = Resolve-Path $LogsFolder
$werHive = "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting"; $werHive = "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting";
$ldHive = "$werHive\LocalDumps"; $ldHive = "$werHive\LocalDumps";
function Setup-appverif($application) function Setup-appverif($application)
{ {
appverif.exe -enable Exceptions Handles Heaps Leak Locks Memory Threadpool TLS SRWLock -for $application appverif.exe -enable Exceptions Handles Heaps Leak Locks Memory Threadpool TLS SRWLock -for $application
...@@ -70,7 +59,7 @@ function Shutdown-appverif($application) ...@@ -70,7 +59,7 @@ function Shutdown-appverif($application)
function Setup-Dumps() function Setup-Dumps()
{ {
if (!(Test-Path $ldHive )) if (!(Test-Path $ldHive))
{ {
New-Item -Path $werHive -Name LocalDumps New-Item -Path $werHive -Name LocalDumps
} }
...@@ -116,24 +105,27 @@ function Shutdown-Dumps() ...@@ -116,24 +105,27 @@ function Shutdown-Dumps()
if ($Mode -eq "Setup") if ($Mode -eq "Setup")
{ {
Setup-appverif w3wp.exe foreach ($element in $exes) {
Setup-appverif iisexpress.exe Setup-appverif $element
}
Setup-Dumps; Setup-Dumps;
} }
if ($Mode -eq "SetupDumps") if ($Mode -eq "SetupDumps")
{ {
Shutdown-appverif w3wp.exe foreach ($element in $exes) {
Shutdown-appverif iisexpress.exe Shutdown-appverif $element
}
Setup-Dumps; Setup-Dumps;
} }
if ($Mode -eq "Shutdown") if ($Mode -eq "Shutdown")
{ {
Shutdown-appverif w3wp.exe foreach ($element in $exes) {
Shutdown-appverif iisexpress.exe Shutdown-appverif $element
}
Shutdown-Dumps; Shutdown-Dumps;
} }
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册