WEFT_OS/scripts/wsl-test.sh
Marco Allegretti 5e7675c043 test(pack): add list_installed_roots tests; run pack tests single-threaded
Two new tests mirror the weft-runtime package_store_roots tests:
- list_installed_roots_uses_weft_app_store_when_set
- list_installed_roots_includes_system_path

wsl-test.sh: add --test-threads=1 for weft-pack to prevent
WEFT_APP_STORE env var races between install, uninstall, and the
new list_roots tests.
2026-03-11 12:00:44 +01:00

42 lines
944 B
Bash

#!/usr/bin/env bash
set -e
PROJECT="/mnt/c/Users/might/Desktop/Development/Systems/WEFT OS"
FAKE_PC_DIR="$HOME/.local/fake-pkgconfig"
mkdir -p "$FAKE_PC_DIR"
cat > "$FAKE_PC_DIR/libdisplay-info.pc" << 'EOF'
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=/usr/include
Name: libdisplay-info
Description: EDID and DisplayID library (version shim for cargo check)
Version: 0.2.9
Libs: -L${libdir} -ldisplay-info
Cflags: -I${includedir}
EOF
source "$HOME/.cargo/env"
export PKG_CONFIG_PATH="$FAKE_PC_DIR:/usr/lib64/pkgconfig:/usr/share/pkgconfig"
cd "$PROJECT"
echo "==> cargo test -p weft-compositor"
cargo test -p weft-compositor 2>&1
echo ""
echo "==> cargo test -p weft-appd"
cargo test -p weft-appd 2>&1
echo ""
echo "==> cargo test -p weft-runtime"
cargo test -p weft-runtime -- --test-threads=1 2>&1
echo ""
echo "==> cargo test -p weft-pack"
cargo test -p weft-pack -- --test-threads=1 2>&1
echo ""
echo "ALL DONE"