debug: fail Windows repro on PTY crashes
This commit is contained in:
parent
1e9a93de32
commit
086697d46c
2 changed files with 40 additions and 7 deletions
13
.github/workflows/test.yml
vendored
13
.github/workflows/test.yml
vendored
|
|
@ -193,3 +193,16 @@ jobs:
|
||||||
- name: Run Windows standalone repro
|
- name: Run Windows standalone repro
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
run: ./script/repro-windows-opentui-crash.ps1 -Version "${{ matrix.version }}"
|
run: ./script/repro-windows-opentui-crash.ps1 -Version "${{ matrix.version }}"
|
||||||
|
|
||||||
|
- name: Upload Windows repro artifacts
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
with:
|
||||||
|
name: windows-opentui-repro-${{ matrix.version }}-${{ matrix.host }}-${{ github.run_attempt }}
|
||||||
|
if-no-files-found: ignore
|
||||||
|
retention-days: 7
|
||||||
|
path: |
|
||||||
|
${{ runner.temp }}/opencode-windows-opentui-${{ matrix.version }}/**/*.log
|
||||||
|
${{ runner.temp }}/opencode-windows-opentui-${{ matrix.version }}/**/*.jsonl
|
||||||
|
${{ runner.temp }}/*.out.log
|
||||||
|
${{ runner.temp }}/*.err.log
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,26 @@ function Invoke-Opencode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Invoke-PtyScenario {
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Scenario,
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Exe,
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Project,
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Version,
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[int]$Seconds
|
||||||
|
)
|
||||||
|
|
||||||
|
node (Join-Path $PSScriptRoot "repro-windows-opentui-pty-session.mjs") -- --exe $Exe --project $Project --version $Version --seconds $Seconds --scenario $Scenario
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "PTY scenario '$Scenario' failed with exit code $LASTEXITCODE"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Write-Section "Environment"
|
Write-Section "Environment"
|
||||||
node --version
|
node --version
|
||||||
npm --version
|
npm --version
|
||||||
|
|
@ -171,14 +191,14 @@ Push-Location $ptyRoot
|
||||||
try {
|
try {
|
||||||
npm init -y | Out-Host
|
npm init -y | Out-Host
|
||||||
npm install "@lydell/node-pty@1.2.0-beta.12" | Out-Host
|
npm install "@lydell/node-pty@1.2.0-beta.12" | Out-Host
|
||||||
node (Join-Path $PSScriptRoot "repro-windows-opentui-pty-session.mjs") -- --exe $exe --project $sessionProject --version $Version --seconds $PtySeconds --scenario text
|
Invoke-PtyScenario -Scenario "text" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||||
node (Join-Path $PSScriptRoot "repro-windows-opentui-pty-session.mjs") -- --exe $exe --project $sessionProject --version $Version --seconds $PtySeconds --scenario markdown
|
Invoke-PtyScenario -Scenario "markdown" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||||
node (Join-Path $PSScriptRoot "repro-windows-opentui-pty-session.mjs") -- --exe $exe --project $sessionProject --version $Version --seconds $PtySeconds --scenario bash-auto
|
Invoke-PtyScenario -Scenario "bash-auto" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||||
node (Join-Path $PSScriptRoot "repro-windows-opentui-pty-session.mjs") -- --exe $exe --project $sessionProject --version $Version --seconds $PtySeconds --scenario bash-permission
|
Invoke-PtyScenario -Scenario "bash-permission" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||||
node (Join-Path $PSScriptRoot "repro-windows-opentui-pty-session.mjs") -- --exe $exe --project $sessionProject --version $Version --seconds $PtySeconds --scenario task-permission
|
Invoke-PtyScenario -Scenario "task-permission" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||||
node (Join-Path $PSScriptRoot "repro-windows-opentui-pty-session.mjs") -- --exe $exe --project $sessionProject --version $Version --seconds $PtySeconds --scenario mcp-npx
|
Invoke-PtyScenario -Scenario "mcp-npx" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||||
if ($Version -eq "1.17.10") {
|
if ($Version -eq "1.17.10") {
|
||||||
node (Join-Path $PSScriptRoot "repro-windows-opentui-pty-session.mjs") -- --exe $exe --project $sessionProject --version $Version --seconds $PtySeconds --scenario mcp-npx-no-native-render
|
Invoke-PtyScenario -Scenario "mcp-npx-no-native-render" -Exe $exe -Project $sessionProject -Version $Version -Seconds $PtySeconds
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
Pop-Location
|
Pop-Location
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue