[mutter/wip/smcv/no-test-environment: 50/50] tests: Don't continue if setup commands fail
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/smcv/no-test-environment: 50/50] tests: Don't continue if setup commands fail
- Date: Sat, 9 Oct 2021 16:42:39 +0000 (UTC)
commit 95bd712d9e57ed630f211e9d0c72e8389a80c06a
Author: Simon McVittie <smcv debian org>
Date: Tue Sep 21 14:42:29 2021 +0100
tests: Don't continue if setup commands fail
Because POSIX sh was, with hindsight, not a particularly well-designed
programming language, if we don't 'set -e', then we'll respond to failure
of a setup command such as cd by carrying on regardless.
Signed-off-by: Simon McVittie <smcv debian org>
cogl/tests/conform/mutter-cogl.test.in | 2 +-
src/tests/mutter-all.test.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/cogl/tests/conform/mutter-cogl.test.in b/cogl/tests/conform/mutter-cogl.test.in
index a584469276..0546d15afe 100644
--- a/cogl/tests/conform/mutter-cogl.test.in
+++ b/cogl/tests/conform/mutter-cogl.test.in
@@ -3,4 +3,4 @@ Type=session
# 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"
+Exec=sh -ec "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 df47c63d91..f99dc29da3 100644
--- a/src/tests/mutter-all.test.in
+++ b/src/tests/mutter-all.test.in
@@ -4,6 +4,6 @@ Description=All Mutter tests
# 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'
+Exec=sh -ec '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]