kick/test.sh
Andrew Hamilton 7e2bb18a85 test: parallel-safe suite (xdist), shared globals session, KICK_DUMP_DIR
Make ./test.sh -n4 work (~47s vs ~156s serial):

- kick.c: KICK_DUMP_DIR env override for frame-dump .ppm paths
  (default /tmp); per-boot dump_seq counters no longer collide
  across concurrent compositors.
- tests: every spawn gets a unique log file and a per-session dump
  directory owned by the Session (close removes the tree instead of
  globbing /tmp, which raced parallel workers' live dumps).
- 14 protocol-globals tests share one module-scoped keeper session
  via short-lived --globals-out clients instead of 14 boots.
- Two presence-waits converted from fixed sleeps to event waits.
- Harden the fullscreen round-trip: wait for seat keyboard focus
  ([diag] kbd-enter, new debug line in window_enter) before tapping
  F -- map alone does not guarantee enter under load and the tap was
  silently dropped.

Serial remains the deterministic gate (documented in test.sh and
README): a few pre-existing timing-sensitive tests can still flake
under parallel load; they pass alone and serially.
2026-09-08 12:02:02 +10:00

14 lines
409 B
Bash
Executable file

#!/bin/sh
# Test runner: ./test.sh [pytest args].
# Serial (`./test.sh`) is the deterministic gate. For iteration speed,
# `./test.sh -n4` runs workers in parallel (~3x faster here); workers are
# isolated (unique logs, per-session KICK_DUMP_DIR, pid-unique sockets),
# but a few timing-sensitive tests may flake under load -- re-run serially
# to confirm.
set -e
cd "$(dirname "$0")"
exec pytest -v "$@"