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.
28 lines
1.2 KiB
Bash
28 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/style-apply-zi-test
|
|
|
|
mkdir -p "$work/c"
|
|
"$bin/ziran" build --target=c --no-main --project --offline --root "$root/tests" \
|
|
-o "$work/c" "$root/tests/style_apply_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/themes/catalog_light.css" "$root/themes/catalog_dark.css" \
|
|
"$root/build/packages/css/styles/material.css" \
|
|
"$root/build/packages/css/styles/classic.css" \
|
|
"$root/build/packages/css/styles/lightfield.css" \
|
|
"$root/assets/styles/inbe.css"
|
|
"${CC:-cc}" -std=c11 -Os -pthread -DZIRAN_BOUNDS_CHECK -ffunction-sections \
|
|
-fdata-sections -Wl,--gc-sections \
|
|
-Wl,--wrap=storage_set_setting_text -Wl,--wrap=storage_get_setting_text \
|
|
-Wl,--wrap=storage_list_settings \
|
|
-I"$root/build/packages/ziran/include" -I"$work/c" -I"$root/src/app" \
|
|
"$root/tests/style_apply_link_test.c" \
|
|
"$work/assets.c" "$work/c"/*.c "$bin/../libziran.a" -ldl -lm -o "$work/test"
|
|
env -u DISPLAY -u WAYLAND_DISPLAY "$work/test"
|
|
echo "Inbe style installation Ziran/native link test passed"
|