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.
57 lines
2.7 KiB
Bash
57 lines
2.7 KiB
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|
bin=${1:-"$root/build/packages/ziran/build/bin"}
|
|
work=$root/build/title-bars-zi-test
|
|
rm -rf "$work/c"
|
|
mkdir -p "$work/c"
|
|
"$bin/zi2zir" --check-only --root "$root/src" \
|
|
--module-path "$root/build/packages/kryon/src/ui" \
|
|
--module-path "$root/build/packages/kryon/src/backend" \
|
|
--module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" \
|
|
$(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
|
|
"$root/src/app/app_chrome.zi"
|
|
"$bin/zi2c" --no-main --root "$root/src" \
|
|
--module-path "$root/build/packages/kryon/src/ui" \
|
|
--module-path "$root/build/packages/kryon/src/backend" \
|
|
--module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" \
|
|
$(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
|
|
-o "$work/c" "$root/src/app/app_chrome.zi"
|
|
"$bin/zi2c" --no-main --root "$root/src" \
|
|
--module-path "$root/build/packages/kryon/src/ui" \
|
|
--module-path "$root/build/packages/kryon/src/backend" \
|
|
--module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" \
|
|
$(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
|
|
-o "$work/c" "$root/src/app/practice_title_bar.zi"
|
|
"$bin/zi2c" --no-main --root "$root/src" \
|
|
--module-path "$root/build/packages/kryon/src/ui" \
|
|
--module-path "$root/build/packages/kryon/src/backend" \
|
|
--module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" \
|
|
$(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
|
|
-o "$work/c" "$root/src/app/assets.zi"
|
|
"$bin/zi2c" --no-main --root "$root/src" \
|
|
--module-path "$root/build/packages/kryon/src/ui" \
|
|
--module-path "$root/build/packages/kryon/src/backend" \
|
|
--module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" \
|
|
$(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
|
|
-o "$work/c" "$root/src/app/image_dimensions.zi"
|
|
python3 "$root/scripts/embed-app-assets.py" "$work/assets.c" \
|
|
"$root/build/packages/kryon/icons/ui.webp"
|
|
set -- "$root/tests/app_chrome_link_test.c" \
|
|
"$work/assets.c"
|
|
for generated in "$work/c"/*.c "$work/c/app"/*.c; do
|
|
case "$generated" in
|
|
"$work/c/app/assets.c") ;;
|
|
*) set -- "$@" "$generated" ;;
|
|
esac
|
|
done
|
|
"${CC:-cc}" -std=c11 -ffunction-sections -fdata-sections \
|
|
-Dimage_dimensions_ImageWidth=ImageWidth \
|
|
-Dimage_dimensions_ImageHeight=ImageHeight \
|
|
-Wl,--gc-sections -I"$root/build/packages/ziran/include" -I"$work/c" \
|
|
-I"$root/src/app" \
|
|
"$@" -o "$work/test"
|
|
env -u DISPLAY -u WAYLAND_DISPLAY "$work/test"
|
|
echo "Inbe title bar Ziran/native link test passed"
|