Files
breeze/tests/device_preferences_zi_test.sh
T
waozi f25b4dfd5e Build Apps and Crypto as locked packages and take the node-app ABI from Apps
Apps and Crypto are now ordinary Ziran dependencies, pinned in ziran.lock
and linked by scripts/packages.sh, instead of local checkouts handed to the
build. Every dependency and the toolchain are on their latest revisions.

scripts/package-paths.sh is the one list of NAME=DIR package paths; the
native, web, Windows and Android builds, the source check, the bundle
scripts and the tests all use it, so they resolve packages the same way.
The shared Apps controller bundle is built from the locked Apps package,
and its reviewed digest matches that build.

Node apps, the feature cells and the host import the module ABI and the
node-app types and codec from the Apps package. Inner Breeze no longer
keeps its own copies, its codec generator, or the unused protocol module.

Test hosts include zir_string.h for the string helpers they call.
2026-10-18 23:20:13 -03:00

29 lines
1.4 KiB
Bash

#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
bin=${1:-"$root/build/ziran-toolchain/bin"}
work=$root/build/device-preferences-zi-test
mkdir -p "$work/c"
"$bin/zi2c" --no-main --root "$root/tests" --module-path "$root/src" \
--module-path "$root/build/packages/ziran/std" --module-path "$root/build/packages/kryon/src/backend" \
--module-path "$root/build/packages/daochi-client" \
--module-path "$root/build/packages/kryon/src/ui" \
--module-path "$root/build/packages/kss/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
-o "$work/c" "$root/tests/device_preferences_link_behavior.zi"
mv "$work/c/device_host.c" "$work/c/device_host.c.skip"
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.kss" "$root/themes/catalog_dark.kss" \
"$root/build/packages/kss/styles/material.kss" \
"$root/assets/styles/inbe.kss"
"${CC:-cc}" -std=c11 -DZIRAN_BOUNDS_CHECK -ffunction-sections \
-fdata-sections -Wl,--gc-sections \
-I"$root/build/packages/ziran/include" -I"$work/c" -I"$root/src/app" \
"$root/tests/device_preferences_link_test.c" \
"$work/assets.c" "$work/c"/*.c -o "$work/test"
env -u DISPLAY -u WAYLAND_DISPLAY "$work/test"
echo "Inbe device preferences Ziran/native link test passed"