Point every harness's default toolchain at build/packages/ziran/build, drop the removed `zi2zx bundle` form, link the generated C each harness actually gets (whole generated folders where the test has no stubs, and Kryon's package-prefixed frame pacing module), and stop listing the header-only type module in the modal rules test. Twenty-two more test targets pass from a clean export; plans/2026-11-17-test-harnesses.md lists the 54 that still fail and why.
20 lines
815 B
Bash
20 lines
815 B
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|
work=$root/build/device-host-sdl-test
|
|
bin=${1:-"$root/build/packages/ziran/build/bin"}
|
|
mkdir -p "$work/c"
|
|
"$bin/zi2c" --no-main --root "$root/src/platform" \
|
|
--module-path "$root/src" --module-path "$root/build/packages/ziran/std" \
|
|
--define NATIVE_WINDOW_HAVE_SDL -o "$work/c" \
|
|
"$root/src/platform/device_host.zi"
|
|
flags=$(pkg-config --cflags --libs sdl2)
|
|
"${CC:-cc}" -std=c11 -Wall -Wextra -Werror -DNATIVE_WINDOW_HAVE_SDL \
|
|
-Wno-unused-function -I"$root/src/app" \
|
|
-I"$root/build/packages/ziran/include" -I"$work/c" \
|
|
"$root/tests/device_host_sdl_test.c" "$work/c"/*.c \
|
|
$flags -o "$work/test"
|
|
env -u DISPLAY -u WAYLAND_DISPLAY SDL_VIDEODRIVER=dummy "$work/test"
|
|
echo "Inbe device host owned-window test passed"
|