Skip to content

meson: Allow running tests headless

Niels De Graef requested to merge wip/nielsdg/xvfb-run into master

This commit makes sure we can properly run the tests in a headless environment, i.e. they don't mess with the user's X display or their session bus. The latter is also needed for parallel tests as they fail to simultaneously own the same name on the session bus.

Replaced the "xvfb-run" meson option with the "headless" option, which is more intuitive (and also more correct, since we now also require dbus-run-session to run the tests, not only xvfb-run).

Finally, note that we need a version of xvfb-run that supports the -d (--auto-display) option. The problem with --auto-servernum which is also regularly used, is that it doesn't shut down cleanly, returning a non-zero exit code, wich makes the test fail.

Fixes #5078 (closed)

Merge request reports