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.
33 lines
1.7 KiB
Bash
33 lines
1.7 KiB
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|
bin=${1:-"$root/build/packages/ziran/build/bin"}
|
|
work=$root/build/language-selection-zi-test
|
|
mkdir -p "$work/c"
|
|
|
|
"$bin/zi2zir" --check-only --root "$root/src" \
|
|
--module-path "$root/build/packages/kryon/src/ui" \
|
|
--module-path "$root/build/packages/css/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
|
|
--module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \
|
|
--module-path "$root/build/packages/daochi-client" \
|
|
"$root/src/app/language_selection.zi"
|
|
"$bin/zi2c" --no-main --root "$root/src" \
|
|
--module-path "$root/build/packages/kryon/src/ui" \
|
|
--module-path "$root/build/packages/css/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
|
|
--module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \
|
|
--module-path "$root/build/packages/daochi-client" \
|
|
-o "$work/c" "$root/src/app/language_selection.zi"
|
|
# The link test stands in for settings_store, so its header declares those
|
|
# procedures instead of defining inline copies.
|
|
"${CC:-cc}" -std=c11 -Wall -Wextra -Werror \
|
|
-Wno-unused-function -Wno-unused-variable -DZIRAN_SETTINGS_STORE_H_SOURCE \
|
|
-ffunction-sections -fdata-sections -Wl,--gc-sections \
|
|
-I"$root/build/packages/ziran/include" -I"$work/c" -I"$work/c/app" \
|
|
"$root/tests/language_selection_link_test.c" \
|
|
"$work/c/app/language_selection.c" "$work/c/view_settings.c" \
|
|
"$work/c/c_string.c" \
|
|
-o "$work/test"
|
|
env -u DISPLAY -u WAYLAND_DISPLAY "$work/test"
|
|
echo "Inbe language selection Ziran/native link test passed"
|