1
0
Fork 0

mutter-all.test: Run tests in a environment with display and bus set

The mutter tests require to run in a valid environment where a display
is available and a session bus, however currently we rely on the current
environment, and this may lead to unexpected behaviors.

So let's just ensure that a display is running through xvfb-run and
that a session bus is running in a temporary directory.

We also ensure to use the gsettings memory backend, even because by
setting TestEnvironment we ensure that no other env variable is leaked
to the test.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1876>
This commit is contained in:
Marco Trevisan (Treviño) 2021-05-26 21:07:41 +02:00
parent 7d88386ee1
commit 14c8f5f94c

View file

@ -1,5 +1,6 @@
[Test]
Description=All Mutter tests
Exec=@libexecdir@/installed-tests/mutter-@apiversion@/mutter-test-runner --all
TestEnvironment=GSETTINGS_BACKEND=memory;
Exec=sh -c 'env XDG_RUNTIME_DIR="$(mktemp -d -t mutter-@apiversion@-all-tests-XXXXXX)" dbus-run-session -- xvfb-run -a -s "+iglx -noreset" -- @libexecdir@/installed-tests/mutter-@apiversion@/mutter-test-runner --all'
Type=session
Output=TAP