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.
32 lines
1.3 KiB
Bash
32 lines
1.3 KiB
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|
bin=${1:-"$root/build/packages/ziran/build/bin"}
|
|
work=$(mktemp -d "$root/build/web-storage-bridge-test.XXXXXX")
|
|
trap 'rm -rf "$work"' EXIT HUP INT TERM
|
|
|
|
for platform in desktop android; do
|
|
mkdir -p "$work/$platform"
|
|
set --
|
|
if [ "$platform" = android ]; then
|
|
set -- --define ANDROID_BUILD
|
|
fi
|
|
"$bin/zi2c" --no-main \
|
|
--root "$root" --module-path "$root/src" \
|
|
--module-path "$root/build/packages/kryon/src/backend" \
|
|
--module-path "$root/build/packages/ziran/std" "$@" \
|
|
-o "$work/$platform" "$root/tests/web_storage_bridge_link.zi" \
|
|
"$root/src/app/host_services.zi" "$root/src/platform/web_bridge.zi"
|
|
find "$work/$platform" -type f -name '*.c' -exec \
|
|
"${CC:-cc}" -std=c11 -Wall -Wextra -Werror -Wno-unused-function \
|
|
-ffunction-sections -fdata-sections -Wl,--gc-sections \
|
|
-I"$root/build/packages/ziran/include" -I"$work/$platform" \
|
|
-I"$work/$platform/src/app" -I"$work/$platform/src/platform" \
|
|
-I"$work/$platform/tests" \
|
|
-o "$work/$platform-test" {} +
|
|
env -u DISPLAY -u WAYLAND_DISPLAY "$work/$platform-test"
|
|
done
|
|
"${JS_RUNTIME:-node}" "$root/tests/web_storage_test.mjs"
|
|
"${JS_RUNTIME:-node}" "$root/tests/web_host_test.mjs"
|