[mutter] mutter-all.test: Run tests in a environment with display and bus set
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] mutter-all.test: Run tests in a environment with display and bus set
- Date: Thu, 27 May 2021 18:11:11 +0000 (UTC)
commit 14c8f5f94c2d8b91b17184c9d7eb7c060fc1176c
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Wed May 26 21:07:41 2021 +0200
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>
src/tests/mutter-all.test.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/tests/mutter-all.test.in b/src/tests/mutter-all.test.in
index 3078ff67e8..6e103c51d0 100644
--- a/src/tests/mutter-all.test.in
+++ b/src/tests/mutter-all.test.in
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]