[mutter/wip/smcv/no-test-environment: 117/118] tests: Don't use TestEnvironment
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/smcv/no-test-environment: 117/118] tests: Don't use TestEnvironment
- Date: Wed, 17 Nov 2021 09:04:10 +0000 (UTC)
commit 7af1043865ad9f50ed3cb5ffa46c8dfbff4a1029
Author: Simon McVittie <smcv debian org>
Date: Tue Sep 21 12:20:20 2021 +0100
tests: Don't use TestEnvironment
The assumption here seems to be that it's an overlay onto the
current environment which would make sense; but the implementation in
gnome-desktop-testing currently removes all other environment variables
(see GNOME/gnome-desktop-testing#1). This causes test failure when the
tests are run in Debian's autopkgtest framework, possibly because PATH
is cleared.
Signed-off-by: Simon McVittie <smcv debian org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2009>
cogl/tests/conform/mutter-cogl.test.in | 6 ++++--
src/tests/mutter-all.test.in | 7 +++++--
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/cogl/tests/conform/mutter-cogl.test.in b/cogl/tests/conform/mutter-cogl.test.in
index fae4f5c56f..a584469276 100644
--- a/cogl/tests/conform/mutter-cogl.test.in
+++ b/cogl/tests/conform/mutter-cogl.test.in
@@ -1,4 +1,6 @@
[Test]
Type=session
-TestEnvironment=COGL_TEST_VERBOSE=1
-Exec=sh -c "cd @libexecdir@/installed-tests/mutter-@apiversion@/cogl/conform; xvfb-run -a -s '+iglx
-noreset' ./run-tests.sh ./config.env ./test-conformance ./unit-tests"
+# Can't use TestEnvironment for COGL_TEST_VERBOSE until there's a solution
+# for https://gitlab.gnome.org/GNOME/gnome-desktop-testing/-/issues/1,
+# and anyway we'd still need to use the shell to 'cd'
+Exec=sh -c "export COGL_TEST_VERBOSE=1; cd @libexecdir@/installed-tests/mutter-@apiversion@/cogl/conform;
xvfb-run -a -s '+iglx -noreset' ./run-tests.sh ./config.env ./test-conformance ./unit-tests"
diff --git a/src/tests/mutter-all.test.in b/src/tests/mutter-all.test.in
index 413d2acd5f..df47c63d91 100644
--- a/src/tests/mutter-all.test.in
+++ b/src/tests/mutter-all.test.in
@@ -1,6 +1,9 @@
[Test]
Description=All Mutter tests
-TestEnvironment=GSETTINGS_BACKEND=memory;
-Exec=sh -c 'env XDG_RUNTIME_DIR="$(mktemp -d -t mutter-@apiversion@-all-tests-XXXXXX)"
@libexecdir@/installed-tests/mutter-@apiversion@/meta-dbus-runner.py xvfb-run -a -s "+iglx -noreset" --
@libexecdir@/installed-tests/mutter-@apiversion@/mutter-test-runner --all'
+# Can't use TestEnvironment for GSETTINGS_BACKEND=memory until there's
+# a solution for
+# https://gitlab.gnome.org/GNOME/gnome-desktop-testing/-/issues/1,
+# and anyway that wouldn't be sufficient to handle XDG_RUNTIME_DIR
+Exec=sh -c 'env GSETTINGS_BACKEND=memory XDG_RUNTIME_DIR="$(mktemp -d -t
mutter-@apiversion@-all-tests-XXXXXX)" @libexecdir@/installed-tests/mutter-@apiversion@/meta-dbus-runner.py
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]