mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-27 01:13:09 +00:00
Stale identifier rejection (state.rs): - WeftShellWindowData gains a closed: AtomicBool field (default false). - Dispatch<ZweftShellWindowV1, WeftShellWindowData>::request() checks the closed flag before processing any request; posts a DefunctWindow error (code 0) if the window has been closed, satisfying the error enum defined in the protocol XML. Unit tests (protocols/mod.rs, 5 tests): - window_data_stores_fields: verifies app_id, title, role, and initial closed state are stored correctly. - closed_flag_transition: verifies AtomicBool store/load round-trip. - manager_interface_name_and_version: confirms generated interface name zweft_shell_manager_v1 and version 1. - window_interface_name_and_version: confirms generated interface name zweft_shell_window_v1 and version 1. - defunct_window_error_code: confirms Error::DefunctWindow == 0 as declared in the protocol XML. Also adds scripts/wsl-test.sh for running cargo test with the libdisplay-info shim in place.
29 lines
678 B
Bash
29 lines
678 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 "ALL DONE"
|