Skip to content

Commit fb4c924

Browse files
committed
always run debug upload
1 parent 03e2a6d commit fb4c924

1 file changed

Lines changed: 33 additions & 43 deletions

File tree

.github/workflows/test.yml

Lines changed: 33 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ jobs:
8989

9090
- name: Install and test Windows
9191
if: startsWith(matrix.os, 'windows')
92+
continue-on-error: true
9293
shell: pwsh
9394
run: |
9495
$ErrorActionPreference = 'Continue'
@@ -130,7 +131,7 @@ jobs:
130131
131132
# run integration tests
132133
cd (Join-Path $env:GITHUB_WORKSPACE 'tests')
133-
# python -m pytest -v --durations=0 --ignore=test_dirgraph.py
134+
python -m pytest -v --durations=0 --ignore=test_dirgraph.py
134135
135136
# build interface tests
136137
cd test_interface
@@ -140,60 +141,49 @@ jobs:
140141
cmake --build . --parallel 2
141142
142143
$iface = Join-Path $build 'src\interface\libsvzero_interface.dll'
143-
if (-not (Test-Path $iface)) { throw "Missing $iface" }
144-
145-
# Threading knobs to avoid deadlocks
146-
$env:OMP_NUM_THREADS='1'
147-
$env:OMP_WAIT_POLICY='PASSIVE'
148-
$env:KMP_INIT_AT_FORK='FALSE'
149-
$env:KMP_WARNINGS='0'
150-
$env:KMP_DUPLICATE_LIB_OK='TRUE'
151-
152-
# Ensure loader can find the interface and any neighbors
153-
$env:PATH = "$($build)\src\interface;$env:PATH"
154-
if (Test-Path (Join-Path $build 'bin')) { $env:PATH = "$($build)\bin;$env:PATH" }
155-
156-
# ctypes smoke test (surface missing dependent)
157-
$code = @"
158-
import ctypes, sys
159-
dll = r'$iface'
160-
print('Trying to load:', dll)
161-
try:
162-
ctypes.CDLL(dll)
163-
print('Loaded OK')
164-
except OSError as e:
165-
print('FAILED to load:', e)
166-
sys.exit(1)
167-
"@
168-
$code | python -
169-
170-
# Paths to JSON test data
144+
python -c "import ctypes,sys; dll=r'$iface'; print('Trying to load:',dll); ctypes.CDLL(dll); print('Loaded OK')"
145+
146+
$test1 = Join-Path $env:GITHUB_WORKSPACE 'tests/test_interface/test_01/svzerod_3Dcoupling.json'
147+
$test2 = Join-Path $env:GITHUB_WORKSPACE 'tests/test_interface/test_02/svzerod_tuned.json'
148+
171149
$test1Json = Join-Path $env:GITHUB_WORKSPACE 'tests/test_interface/test_01/svzerod_3Dcoupling.json'
172150
$test2Json = Join-Path $env:GITHUB_WORKSPACE 'tests/test_interface/test_02/svzerod_tuned.json'
173151
174-
cd (Join-Path $env:GITHUB_WORKSPACE 'tests/test_interface/build_tests')
152+
# Confirm test EXEs exist
153+
$test1Exe = Join-Path (Join-Path (Get-Location) 'test_01') 'svZeroD_interface_test01.exe'
154+
$test2Exe = Join-Path (Join-Path (Get-Location) 'test_02') 'svZeroD_interface_test02.exe'
155+
Write-Host "`n=== Interface test binaries ==="
156+
Test-Path $test1Exe | % { "test_01 exe exists: $_" }
157+
Test-Path $test2Exe | % { "test_02 exe exists: $_" }
175158
159+
# Helper to run with timeout + capture logs
176160
function Run-TestExe {
177-
param([string]$dir, [string]$exe, [string]$buildRoot, [string]$json, [string]$name)
178-
Push-Location $dir
161+
param([string]$exe, [string]$arg1, [string]$arg2, [string]$wd)
162+
Push-Location $wd
179163
Remove-Item -Force -ErrorAction SilentlyContinue out.txt, err.txt
180-
$p = Start-Process -FilePath $exe -ArgumentList @($buildRoot, $json) -NoNewWindow -PassThru `
164+
$p = Start-Process -FilePath $exe -ArgumentList @("$arg1","$arg2") -NoNewWindow -PassThru `
181165
-RedirectStandardOutput out.txt -RedirectStandardError err.txt
182166
if (-not (Wait-Process -Id $p.Id -Timeout 120 -ErrorAction SilentlyContinue)) {
183-
Write-Host "TIMEOUT in $name"; Get-Content err.txt -ea SilentlyContinue; Get-Content out.txt -ea SilentlyContinue
184-
Stop-Process -Id $p.Id -Force -ea SilentlyContinue
185-
Pop-Location; throw "Timeout: $name"
186-
}
187-
if ($p.ExitCode -ne 0) {
188-
Write-Host "`n--- $name stdout ---"; Get-Content out.txt -ea SilentlyContinue
189-
Write-Host "`n--- $name stderr ---"; Get-Content err.txt -ea SilentlyContinue
190-
Pop-Location; throw "$name exited with $($p.ExitCode)"
167+
Write-Host "TIMEOUT: killing $exe"
168+
Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue
169+
Get-Content err.txt -ErrorAction SilentlyContinue | Write-Host
170+
Get-Content out.txt -ErrorAction SilentlyContinue | Write-Host
171+
throw "Timed out running $exe"
191172
}
173+
$exit = $p.ExitCode
192174
Pop-Location
175+
if ($exit -ne 0) {
176+
Write-Host "`n--- stdout ---"; Get-Content (Join-Path $wd 'out.txt') -ErrorAction SilentlyContinue
177+
Write-Host "`n--- stderr ---"; Get-Content (Join-Path $wd 'err.txt') -ErrorAction SilentlyContinue
178+
throw "$exe exited with code $exit"
179+
}
193180
}
194181
195-
Run-TestExe -dir '.\test_01' -exe 'svZeroD_interface_test01.exe' -buildRoot $build -json $test1Json -name 'test_01'
196-
Run-TestExe -dir '.\test_02' -exe 'svZeroD_interface_test02.exe' -buildRoot $build -json $test2Json -name 'test_02'
182+
# Run test_01 from its own dir with hard timeout and logs
183+
Run-TestExe -exe $test1Exe -arg1 $build -arg2 $test1Json -wd (Join-Path (Get-Location) 'test_01')
184+
185+
# Run test_02 likewise
186+
Run-TestExe -exe $test2Exe -arg1 $build -arg2 $test2Json -wd (Join-Path (Get-Location) 'test_02')
197187
198188
# build installer
199189
choco install nsis -y

0 commit comments

Comments
 (0)