mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-09-06 18:05:39 +00:00
![]() This replaces the old test harness with a new one. The old harness relied on fork()'ing each test which makes tests independent, but makes debugging them harder. The new harness runs client code in a thread instead of a new process. A side-effect of not fork()'ing anymore is that any failure will stop running a test series short. Fortunately we do not have any tests that are expected to crash or fail. The old harness executed 'weston' from Meson, with lots of setup as both command line options and environment variables. The new harness executes wet_main() instead: the test program itself calls the compositor main function to execute the compositor in-process. Command line arguments are configured in the test program itself, not in meson.build. Environment variables aside, you are able to run a test by simply executing the test program, even if it is a plugin test. The new harness adds a new type of iteration: fixtures. For now, fixtures are used to set up the compositor for tests that need a compositor. If necessary, a fixture setup may include a data array of arbitrary type for executing the test series for each element in the array. This will be most useful for running screenshooting tests with both Pixman- and GL-renderers. The new harness outputs TAP formatted results into stdout. Meson is not switched to consume TAP yet though, because it would require a Meson version requirement bump and would not have any benefits at this time. OTOH outputting TAP is trivial and sets up a clear precedent of random test chatter belonging to stderr. This commit migrates only few tests to actually make use of the new features: roles is a basic client test, subsurface-shot is a client test that demonstrates the fixture array, and plugin-registry is a plugin test. The rest of the tests will be migrated later. Once all tests are migrated, we can remove the test-specific setup from meson.build, leaving only the actual build instructions in there. The not migrated tests and stand-alone tests suffer only a minor change: they no longer fork() for each TEST(), otherwise they keep running as before. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> |
||
---|---|---|
.. | ||
reference | ||
bad-buffer-test.c | ||
config-parser-test.c | ||
devices-test.c | ||
event-test.c | ||
input-timestamps-helper.c | ||
input-timestamps-helper.h | ||
internal-screenshot-test.c | ||
internal-screenshot.ini | ||
ivi-layout-internal-test.c | ||
ivi-layout-test-client.c | ||
ivi-layout-test-plugin.c | ||
ivi-shell-app-test.c | ||
ivi-test.h | ||
keyboard-test.c | ||
linux-explicit-synchronization-test.c | ||
matrix-test.c | ||
meson.build | ||
plugin-registry-test.c | ||
pointer-test.c | ||
presentation-test.c | ||
roles-test.c | ||
setbacklight.c | ||
string-test.c | ||
subsurface-shot-test.c | ||
subsurface-test.c | ||
surface-global-test.c | ||
surface-screenshot-test.c | ||
surface-test.c | ||
text-test.c | ||
timespec-test.c | ||
touch-test.c | ||
vertex-clip-test.c | ||
viewporter-test.c | ||
weston-test-client-helper.c | ||
weston-test-client-helper.h | ||
weston-test-desktop-shell.c | ||
weston-test-fixture-compositor.c | ||
weston-test-fixture-compositor.h | ||
weston-test-runner.c | ||
weston-test-runner.h | ||
weston-test.c | ||
weston-testsuite-data.h | ||
xwayland-test.c |