mirror of
https://github.com/systemd/systemd.git
synced 2024-11-24 10:43:35 +08:00
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.
This commit is contained in:
parent
75e4c768e2
commit
d0533a319b
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user