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

OSOE-464: Executing dotnet test with process timeout #310

Merged
8 changes: 4 additions & 4 deletions .github/actions/test-dotnet/Invoke-SolutionTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ function MemDumpProcess($Output, $RootProcess, $DumpRootPath, $Process)
{
$Output.AppendLine("::warning::Collecting a dump of the process $($Process.Id).")

$outputFile = "$DumpRootPath/dotnet-test-hang-dump-$($RootProcess.Id)-$($Process.Parent.Id)-$($Process.Name)_$($Process.Id)"

dotnet-dump collect -p $Process.Id --type Full -o "$outputFile.dmp" 2>&1 > "$outputFile.log"
$outputFile = "$DumpRootPath/dotnet-test-hang-dump-$($RootProcess.Id)-$($Process.Parent.Id)_$($Process.Id)"
$Process | Format-Table Id, SI, Name, Path, @{ Label = 'TotalRunningTime'; Expression = { (Get-Date) - $PSItem.StartTime } } > "$outputFile.log"
dotnet-dump collect -p $Process.Id --type Full -o "$outputFile.dmp" 2>&1 >> "$outputFile.log"
}

function MemDumpProcessTree($Output, $RootProcess, $DumpRootPath, $CurrentProcess)
Expand All @@ -101,7 +101,7 @@ function MemDumpProcessTree($Output, $RootProcess, $DumpRootPath, $CurrentProces

function KillProcessTree($Output, $Process)
{
$Output.AppendLine("::warning::Killing the process $($Process.Name)($($Process.Id)).")
$Output.AppendLine("::warning::Killing the process $($Process.ProcessName)($($Process.Id)).")

foreach ($child in GetChildProcesses -Id $Process.Id)
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:

- name: Tests
if: inputs.test-disable == 'false'
uses: Lombiq/GitHub-Actions/.github/actions/test-dotnet@dev
uses: Lombiq/GitHub-Actions/.github/actions/test-dotnet@issue/OSOE-464-executing-dotnet-test-with-process-timeout
with:
blame-hang-timeout: ${{ inputs.blame-hang-timeout }}
build-directory: ${{ inputs.build-directory }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-orchard-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ jobs:

- name: Tests
if: inputs.test-disable == 'false'
uses: Lombiq/GitHub-Actions/.github/actions/test-dotnet@dev
uses: Lombiq/GitHub-Actions/.github/actions/test-dotnet@issue/OSOE-464-executing-dotnet-test-with-process-timeout
with:
blame-hang-timeout: ${{ inputs.blame-hang-timeout }}
build-directory: ${{ inputs.build-directory }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/msbuild-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:

- name: Tests
if: inputs.test-disable == 'false'
uses: Lombiq/GitHub-Actions/.github/actions/test-dotnet@dev
uses: Lombiq/GitHub-Actions/.github/actions/test-dotnet@issue/OSOE-464-executing-dotnet-test-with-process-timeout
with:
build-directory: ${{ inputs.build-directory }}
dotnet-test-process-timeout: ${{ inputs.dotnet-test-process-timeout }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spelling-this-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ on:
jobs:
spelling:
name: Spelling
uses: Lombiq/GitHub-Actions/.github/workflows/spelling.yml@dev
uses: Lombiq/GitHub-Actions/.github/workflows/spelling.yml@issue/OSOE-464-executing-dotnet-test-with-process-timeout
4 changes: 2 additions & 2 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:

- name: Check Spelling
id: check-spelling-action
uses: Lombiq/GitHub-Actions/.github/actions/spelling@dev
uses: Lombiq/GitHub-Actions/.github/actions/spelling@issue/OSOE-464-executing-dotnet-test-with-process-timeout
with:
merge-file-excludes: ${{ inputs.merge-file-excludes }}
merge-forbidden-patterns: ${{ inputs.merge-forbidden-patterns }}
Expand All @@ -138,7 +138,7 @@ jobs:
if: always() && needs.check-spelling.outputs.followup && github.event_name == 'pull_request'
steps:
- name: Comment (PR)
uses: Lombiq/GitHub-Actions/.github/actions/spelling@dev
uses: Lombiq/GitHub-Actions/.github/actions/spelling@issue/OSOE-464-executing-dotnet-test-with-process-timeout
with:
post-comment: 1
task: ${{ needs.check-spelling.outputs.followup }}
Loading