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

33 lines
1.5 KiB
Bash

#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
bin=${1:-"$root/build/packages/ziran/build/bin"}
kryon=${KRYON_DIR:-"$root/build/packages/kryon"}
entity=${ENTITY_DIR:-"$root/build/packages/entity"}
apps=${APPS_DIR:-"$root/build/packages/apps"}
work=$root/build/notification-lifecycle-test
rm -rf "$work"
mkdir -p "$work/c"
sh "$root/scripts/run-ziran.sh" "$bin/zi2c" --no-main --root "$root" \
--module-path "$root/src" \
--module-path "$kryon/src/ui" \
--module-path "$kryon/src/backend" \
--module-path "kryon=$kryon/src/ui" \
--module-path "kryon=$kryon/src/backend" \
--module-path "entity=$entity/src" \
--module-path "apps=$apps/src" \
--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/daochi-client" \
-o "$work/c" "$root/tests/notification_lifecycle_behavior.zi"
find "$work/c" -name '*.c' -type f -exec \
"${CC:-cc}" -std=c11 -ffunction-sections -fdata-sections \
-Wl,--gc-sections -Wl,--wrap=LocaleText \
-Wl,--wrap=DailyNotificationsSupported -Wl,--wrap=ScheduleDailyNotification \
-Wl,--wrap=ScheduleNotificationDates -Wl,--wrap=CancelDailyNotification \
-I"$root/build/packages/ziran/include" -I"$work/c" -I"$work/c/tests" \
-o "$work/test" {} +
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u GDK_DISPLAY "$work/test"
echo "Notification lifecycle, preference preservation, reminder catch-up and plain toast timing passed"