Skip to content

Commit 4d93597

Browse files
committed
ci: add stderr capture for Windows HTTP test debugging
Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent bca116c commit 4d93597

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/test-examples.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,8 @@ jobs:
644644

645645
- name: Run and check output
646646
shell: pwsh
647+
env:
648+
HL_DISPATCH_DEBUG: "1"
647649
run: |
648650
$kernel = (Resolve-Path "image/kernel").Path
649651
$cpio = (Resolve-Path "image/initrd.cpio").Path
@@ -688,9 +690,10 @@ jobs:
688690
if ($memory -ne '') {
689691
$memArgs = @('-m', $memory)
690692
}
693+
$stderrLog = Join-Path $env:RUNNER_TEMP 'hl-stderr.log'
691694
$proc = Start-Process -FilePath 'hyperlight-unikraft' `
692695
-ArgumentList (@('-q') + $memArgs + @($kernel, '--initrd', $cpio) + $argList) `
693-
-PassThru -NoNewWindow
696+
-PassThru -NoNewWindow -RedirectStandardError $stderrLog
694697
$ready = $false
695698
for ($i = 0; $i -lt 30; $i++) {
696699
try {
@@ -703,6 +706,8 @@ jobs:
703706
}
704707
if (-not $ready) {
705708
Write-Host "FAIL: server did not become ready within 30s"
709+
Write-Host "=== stderr (last 50 lines) ==="
710+
Get-Content $stderrLog -Tail 50 -ErrorAction SilentlyContinue
706711
Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue
707712
exit 1
708713
}

0 commit comments

Comments
 (0)