Files
breeze/tests/fonts_zi_test.sh
T
waozi 458f4fb5eb Run the test harnesses on the Ziran 0.6 toolchain
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.
2026-11-17 03:12:21 -03:00

27 lines
1.3 KiB
Bash

#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
bin=${1:-"$root/build/packages/ziran/build/bin"}
work=$root/build/fonts-zi-test
mkdir -p "$work/c"
"$bin/zi2c" --no-main --root "$root/tests" --module-path "$root/src" \
--module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/daochi-client" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") --module-path "$root/build/packages/kryon/src/backend" \
--module-path "$root/build/packages/kryon/src/ui" \
-o "$work/c" "$root/tests/fonts_link_behavior.zi"
mkdir -p "$work/c/app"
cp "$work/c/assets.h" "$work/c/app/assets.h"
python3 "$root/scripts/embed-app-assets.py" "$work/assets.c" \
"$root/assets/fonts/subset/NotoSans-App-Regular.ttf" \
"$root/assets/fonts/subset/NotoSansJP-App-Regular.otf" \
"$root/assets/fonts/subset/NotoSansKR-App-Regular.otf" \
"$root/assets/fonts/subset/NotoSansSC-App-Regular.otf"
"${CC:-cc}" -std=c11 -O1 -DZIRAN_BOUNDS_CHECK -ffunction-sections \
-fdata-sections -Wl,--gc-sections \
-I"$root/build/packages/ziran/include" -I"$work/c" -I"$root/src/app" \
"$root/tests/fonts_link_test.c" \
"$work/assets.c" "$work/c"/*.c -o "$work/test"
env -u DISPLAY -u WAYLAND_DISPLAY "$work/test"
echo "Inbe locale fonts Ziran/native link test passed"