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

22 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/audio-first-cue
generated=$work/generated
mkdir -p "$generated"
"$bin/ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
--module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \
--module-path "$root/build/packages/kryon/src/backend" --module-path "$root/build/packages/ziran/std" \
--module-path "$root/build/packages/daochi-client" --module-path "$root/build/packages/css/src" \
--module-path "$root/build/packages/game2d/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
-o "$generated" "$root/tests/audio_first_cue_test.zi"
python3 "$root/scripts/embed-app-assets.py" "$work/assets.c" \
"$root/assets/sounds/bell.ogg" "$root/assets/sounds/breath-in.ogg" "$root/assets/sounds/breath-out.ogg"
"${CC:-cc}" -std=c11 -O0 -ffunction-sections -fdata-sections \
-I"$root/build/packages/ziran/include" -I"$generated" -I"$root/src/app" \
"$generated"/*.c "$work/assets.c" "$root/tests/audio_first_cue_host.c" \
-Wl,--gc-sections -lm -o "$work/test"
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS "$work/test"
echo 'First bell and breath cues initialize audio and play on the first request'