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

Wait for Dumps #4887

Merged
merged 3 commits into from
Mar 3, 2025
Merged
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
Next Next commit
Wait for Dumps
nibanks committed Mar 3, 2025
commit be2a15af12b7f0317eac81445a234d4bbd673fbb
12 changes: 11 additions & 1 deletion scripts/run-executable.ps1
Original file line number Diff line number Diff line change
@@ -382,6 +382,15 @@ function Wait-Executable($Exe) {
LogErr "Process had nonzero exit code: $($Exe.Process.ExitCode)"
$KeepOutput = $true
}
# Wait up to 30 seconds for files to appear in $LogDir if $AZP is set.
if ($AZP) {
$Timeout = 30
$Elapsed = 0
while ($Elapsed -lt $Timeout -and (Get-ChildItem -Path $directoryPath).Count -eq 0) {
Start-Sleep -Seconds 1
$Elapsed++
}
}
$DumpFiles = (Get-ChildItem $LogDir) | Where-Object { $_.Extension -eq ".dmp" }
if ($DumpFiles) {
LogErr "Dump file(s) generated"
@@ -462,7 +471,8 @@ function Wait-Executable($Exe) {
Remove-Item $LogDir -Recurse -Force | Out-Null
}

Log "Output available at $($LogDir)"
Log "Output available at $LogDir"
if ($AZP) { dir }

} else {
if ($LogProfile -ne "None") {