2026-04-21 17:13:31 -03:00
|
|
|
#!/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"
|
|
|
|
|
|
2026-05-10 23:14:15 -03:00
|
|
|
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
|
|
|
|
|
|
2026-04-21 17:13:31 -03:00
|
|
|
INPUT_TESTS=(
|
|
|
|
|
--test client_app_include_contract
|
|
|
|
|
--test client_inputs_contract
|
|
|
|
|
--test client_inputs_extra_contract
|
2026-05-10 23:14:15 -03:00
|
|
|
--test client_inputs_routing_contract
|
2026-04-21 17:13:31 -03:00
|
|
|
--test client_keyboard_activation_contract
|
2026-05-10 23:14:15 -03:00
|
|
|
--test client_keyboard_paste_rpc_contract
|
|
|
|
|
--test client_keyboard_process_contract
|
2026-04-21 17:13:31 -03:00
|
|
|
--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
|
2026-05-10 23:14:15 -03:00
|
|
|
--test client_mouse_uinput_contract
|
2026-04-21 17:55:26 -03:00
|
|
|
--test server_gadget_include_contract
|
|
|
|
|
--test server_main_binary_extra_contract
|
2026-04-21 17:13:31 -03:00
|
|
|
--test server_runtime_smoke_contract
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
cargo fmt --all -- --check
|
2026-05-10 23:14:15 -03:00
|
|
|
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[@]}"
|