Commit graph

9 commits

Author SHA1 Message Date
1a77721177 test: Take _ensure_build out of test_smoke.
- It didn't work with pytest xdist.
- The AI sometimes forgets to build before testing, but it is rare.
2026-09-10 08:52:47 +10:00
be00a95d9f test: Run all tests
- Run most tests in parallel, and then the flaky ones serially.
2026-09-10 08:38:06 +10:00
1f295a0580 Revert "test: two-phase default gate -- parallel non-flaky, then serial flaky"
This reverts commit ce19b77ac7.
2026-09-08 18:08:58 +10:00
ce19b77ac7 test: two-phase default gate -- parallel non-flaky, then serial flaky
./test.sh with no -n/-m runs the suite as: (1) non-flaky tests under
-n10 (~25s), (2) flaky-marked tests serially (~35s); either phase
failing fails the run (~60s total vs ~160s serial before). Explicit
-n/-m flags keep the old single-phase passthrough behavior
(./test.sh -n0 forces serial). The -m override in phase 2 restates
'not fuzz' since command-line -m replaces pytest.ini's -m.
2026-09-08 13:49:03 +10:00
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
70bae3061f rebuild kick before every session-spawning test
tests could silently run against a stale binary when the tree failed to
compile (the suite stayed green against the previous build).  Session
construction and _spawn_standalone now run ./build.sh -- incremental and
a no-op when up to date -- and raise immediately on failure, so a broken
tree errors every spawning test at setup with the compiler output above
it instead.  test.sh drops its build step; pytest triggers rebuilds
itself, which also covers scripts that import this module directly.
2026-08-26 11:04:31 +10:00
7db91f9d60 make test scripts build first; keep build.sh incremental
Running pytest against a stale build/ binary silently proved nothing:
test.sh and test-headless.sh now run build.sh first, and build.sh
skips meson setup/compile when both binaries are newer than their
sources (tracked per program: kick.c feeds kick, tests/wltest.c feeds
wltest, meson.build and subprojects feed both).
2026-08-19 16:02:20 +10:00
16669a46a7 Add six smoke tests and [claim] client-PID log 2026-08-10 19:22:20 +10:00
2b034f990f Add stdin event feed and smoke test suite
Compositor: read raw keyboard records from stdin and dispatch them into
the real host_kbd_key/host_kbd_modifiers handlers, so keybindings (F11,
Ctrl+PageUp/Down, F9/F10 dumps) can be driven without a focused host
window or wtype. Binary wire: 1|u32 key|u32 state, 2|u32 mods|...

Tests: tests/wltest.c solid-colour xdg_toplevel client, plus a pytest
suite (tests/test_smoke.py) that launches nested instances per test and
feeds events through the new channel. test.sh runs it. F11 fullscreen
toggle now logs its new state.
2026-08-10 07:29:10 +10:00