From 120853dbb986e67de49a975e890bbd110cca1326 Mon Sep 17 00:00:00 2001 From: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com> Date: Sat, 14 Nov 2026 10:36:44 -0500 Subject: [PATCH] Interop tests: the Wine run's exit status counts, not only the pass marker run-tests.sh ended with a grep for the marker, which threw away the test program's exit status: a crash after ALL TESTS PASSED counted as a pass. Keep the program's status through the output filter and require both a zero exit and the marker (SKIP still exits 0). Refs #52 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com> --- clean/runtime/interop/tests/run-tests.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/clean/runtime/interop/tests/run-tests.sh b/clean/runtime/interop/tests/run-tests.sh index 1c87b0d1..565a19e9 100755 --- a/clean/runtime/interop/tests/run-tests.sh +++ b/clean/runtime/interop/tests/run-tests.sh @@ -33,6 +33,9 @@ echo "== Wine tests" export WINEDEBUG=${WINEDEBUG:--all} WINEPREFIX=${WINEPREFIX:-$work/wineprefix} run=("$wine") if [ -z "${DISPLAY:-}" ] && command -v xvfb-run >/dev/null; then run=(xvfb-run -a "$wine"); fi -(cd "$work" && "${run[@]}" test_interop_d3d12.exe wronggpu_runtime.dll "$@" 2>&1 | tr -d "\r" | - grep -v -E "X connection|XIO|requests \(") | tee "$work/result.txt" -grep -q "ALL TESTS PASSED\|^SKIP" "$work/result.txt" +# Both count: the test program's own exit status (a crash after the marker is a failure) and the marker. +(cd "$work" && { "${run[@]}" test_interop_d3d12.exe wronggpu_runtime.dll "$@" 2>&1 | tr -d "\r" | + grep -v -E "X connection|XIO|requests \("; exit "${PIPESTATUS[0]}"; }) | tee "$work/result.txt" +status=${PIPESTATUS[0]} +if [ "$status" -ne 0 ]; then echo "== Wine test run failed (exit status $status)"; exit 1; fi +grep -q "ALL TESTS PASSED\|^SKIP" "$work/result.txt" || { echo "== Wine test run printed no pass marker"; exit 1; }