summaryrefslogtreecommitdiff
path: root/test/TEST-01-BASIC
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2019-05-27 19:59:26 +0200
committerEvgeny Vereshchagin <evvers@ya.ru>2019-05-27 22:31:55 +0300
commitd0533a319b075115268eea859e11d35153d58265 (patch)
treed91c3f65801b2fc05dd731ebd9bbca250f58e5b0 /test/TEST-01-BASIC
parent75e4c768e212cc66a78b05ce70a2871e133833cb (diff)
downloadsystemd-d0533a319b075115268eea859e11d35153d58265.tar.gz
test: correctly fail when system is borked
In certain situations, the systemctl commands may fail (e.g. due to missing shared libraries), but the 'script' continues and creates a /testok file, marking the test incorrectly as passed. Let's fix this and bail out immediately when a command exits with a non-zero exit code.
Diffstat (limited to 'test/TEST-01-BASIC')
-rwxr-xr-xtest/TEST-01-BASIC/test.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
index 2314ec37ce..0f29ad7eda 100755
--- a/test/TEST-01-BASIC/test.sh
+++ b/test/TEST-01-BASIC/test.sh
@@ -24,7 +24,7 @@ Description=Testsuite service
After=multi-user.target
[Service]
-ExecStart=/bin/sh -x -c 'systemctl --state=failed --no-legend --no-pager > /failed ; systemctl daemon-reload ; echo OK > /testok'
+ExecStart=/bin/sh -e -x -c 'systemctl --state=failed --no-legend --no-pager > /failed ; systemctl daemon-reload ; echo OK > /testok'
Type=oneshot
EOF