lesavka/scripts/ci/input_transport_gate.sh

42 lines
1.4 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
# Guard local/remote keyboard and mouse routing before pushing input changes.
set -euo pipefail
ROOT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
cd "$ROOT"
if [[ "${LESAVKA_ALLOW_DISRUPTIVE_INPUT_TESTS:-0}" != "1" ]]; then
cat <<'MSG'
Skipping disruptive input transport tests.
These tests create virtual keyboards/mice and can emit events into the active
desktop. Run them only on an isolated worker/session with:
LESAVKA_ALLOW_DISRUPTIVE_INPUT_TESTS=1 scripts/ci/input_transport_gate.sh
MSG
exit 0
fi
INPUT_TESTS=(
--test client_app_include_contract
--test client_inputs_contract
--test client_inputs_extra_contract
--test client_inputs_routing_contract
--test client_keyboard_activation_contract
--test client_keyboard_paste_rpc_contract
--test client_keyboard_process_contract
--test client_keyboard_shift_contract
--test client_keyboard_include_contract
--test client_keyboard_include_extra_contract
--test client_mouse_include_contract
--test client_mouse_include_extra_contract
--test client_mouse_uinput_contract
2026-04-21 17:55:26 -03:00
--test server_gadget_include_contract
--test server_main_binary_extra_contract
--test server_runtime_smoke_contract
)
cargo fmt --all -- --check
cargo check -q -p lesavka_client --bin lesavka-client
cargo check -q -p lesavka_server --bin lesavka-server
cargo test -q -p lesavka_tests --features disruptive-input-tests "${INPUT_TESTS[@]}"