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.
30 lines
1.2 KiB
Bash
30 lines
1.2 KiB
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|
bin=${1:-"$root/build/packages/ziran/build/bin"}
|
|
work=$root/build/schema-zi-test
|
|
rm -rf "$work/generated"
|
|
mkdir -p "$work/generated"
|
|
"$bin/zi2c" --no-main --root "$root/src" \
|
|
--module-path "$root/build/packages/ziran/std" \
|
|
-o "$work/generated" "$root/src/storage/schema.zi"
|
|
"$bin/zi2c" --no-main --root "$root/src" \
|
|
--module-path "$root/build/packages/ziran/std" \
|
|
-o "$work/generated" "$root/src/storage/sql_query.zi"
|
|
"$bin/zi2c" --no-main --root "$root/src" \
|
|
--module-path "$root/build/packages/ziran/std" \
|
|
-o "$work/generated" "$root/src/storage/user.zi"
|
|
"$bin/zi2c" --no-main --root "$root/src" \
|
|
--module-path "$root/build/packages/ziran/std" \
|
|
-o "$work/generated" "$root/src/storage/meta.zi"
|
|
generated_sources=$(find "$work/generated" -name '*.c' | sort)
|
|
"${CC:-cc}" -std=c11 -O0 -I"$root/vendor-builds/sqlite" \
|
|
-I"$root/build/packages/ziran/include" -I"$work/generated" \
|
|
"$root/tests/schema_zi_test.c" \
|
|
$generated_sources \
|
|
"$root/vendor-builds/sqlite/sqlite3.c" -ldl -lpthread -lm \
|
|
-o "$work/test"
|
|
env -u DISPLAY -u WAYLAND_DISPLAY "$work/test" \
|
|
"$root/tests/fixtures/schema-1.8.9.sql"
|