Files
breeze/tests/sync_status_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

25 lines
858 B
Bash

#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
bin=${1:-"$root/build/packages/ziran/build/bin"}
include=${ZIRAN_INCLUDE:-"$root/build/packages/ziran/include"}
work=$root/build/sync-status-test
mkdir -p "$work/c/storage"
"$bin/zi2zir" --check-only --root "$root/src" \
"$root/src/storage/sync_status.zi"
"$bin/zi2c" --no-main --root "$root/tests" \
--module-path "$root/src" -o "$work/c" \
"$root/tests/sync_status_link_behavior.zi"
cp "$work/c/sync_status.h" "$work/c/storage/sync_status.h"
"${CC:-cc}" -std=c11 -Wall -Wextra -Werror -DZIRAN_BOUNDS_CHECK \
-I"$include" -I"$work/c" -I"$root/src/app" \
-I"$root/src/storage" \
"$root/tests/sync_status_host_test.c" \
"$work/c/sync_status.c" \
"$work/c/sync_status_link_behavior.c" \
-o "$work/test"
env -u DISPLAY -u WAYLAND_DISPLAY "$work/test"