summaryrefslogtreecommitdiff
path: root/docs/testing.md
blob: ce2082f5e409ca5abf1ad7cd4ac89e0541514b7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Tests

```sh
meson setup build
meson compile -C build
meson test -C build --print-errorlogs
```

Tests cover public static/shared C and C++11 consumers, exact shared exports,
queue ownership/order/destruction, UTF-8, GL attributes, private native event loops,
clipboard, IME editing, pointer/pen coherence, cursor, and popup positioning. Native
unit fixtures deliberately use private implementation headers; applications must use
installed public headers.

For private Linux display servers and actual GPU presentation, install Weston,
Xwayland, EGL/wayland-egl, and Vulkan/Mesa software drivers, then:

```sh
meson configure build -Dintegration_tests=true
meson compile -C build
meson test -C build --print-errorlogs
```

The integration harness starts its own headless GL Weston and Xwayland, runs public
surface ownership/CPU damage/wakeup/refresh checks, GL drawing/readback/context-sharing/
resize, Vulkan swapchain clear/present, and example smoke tests. It selects Mesa
software rendering and Lavapipe when available. It needs permission to create local
Unix sockets. A sandbox blocking those sockets is not a backend test result.

`-Dx11_tablet_tests=true` additionally uses Xorg dummy/inputtest drivers for pen input
without physical hardware. These are separate from the compositor-free native unit
fixtures. Cocoa integration tests run only on macOS and need the native SDK/display.
Linux results do not validate Cocoa compilation or runtime.

For memory/undefined-behavior checks use a separate build with `-Db_sanitize=address,undefined`
and run the same suites. Keep sanitizer builds isolated from the normal build.