Skip to content

Automatically capture crashdumps for C++ client tests #7940

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

Merged
merged 10 commits into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ jobs:
beforeBuild:
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
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:
- name: Windows_Test_Logs
path: artifacts/logs/
Expand Down
7 changes: 7 additions & 0 deletions .azure/pipelines/signalr-daily-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,11 @@ jobs:
agentOs: Windows
jobName: SignalRDailyTests
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()

Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
param($Mode)

# TEMP TEMP TEMP
# 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

param(
[string]$Mode,
[string[]]$exes
)

if (!($DumpFolder))
{
$DumpFolder = "$PSScriptRoot\..\..\..\..\artifacts\logs\dumps"
$DumpFolder = "$PSScriptRoot\..\..\..\artifacts\logs\dumps"
}
if (!(Test-Path $DumpFolder))
{
New-Item $DumpFolder -ItemType Directory;
}
$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";
$ldHive = "$werHive\LocalDumps";


function Setup-appverif($application)
{
appverif.exe -enable Exceptions Handles Heaps Leak Locks Memory Threadpool TLS SRWLock -for $application
Expand Down Expand Up @@ -70,7 +59,7 @@ function Shutdown-appverif($application)

function Setup-Dumps()
{
if (!(Test-Path $ldHive ))
if (!(Test-Path $ldHive))
{
New-Item -Path $werHive -Name LocalDumps
}
Expand Down Expand Up @@ -116,24 +105,27 @@ function Shutdown-Dumps()

if ($Mode -eq "Setup")
{
Setup-appverif w3wp.exe
Setup-appverif iisexpress.exe
foreach ($element in $exes) {
Setup-appverif $element
}

Setup-Dumps;
}

if ($Mode -eq "SetupDumps")
{
Shutdown-appverif w3wp.exe
Shutdown-appverif iisexpress.exe
foreach ($element in $exes) {
Shutdown-appverif $element
}

Setup-Dumps;
}

if ($Mode -eq "Shutdown")
{
Shutdown-appverif w3wp.exe
Shutdown-appverif iisexpress.exe
foreach ($element in $exes) {
Shutdown-appverif $element
}

Shutdown-Dumps;
}
Expand Down