TEST-29: trim output a bit
IIUC, pipefail doesn't matter for a sequence of commands joined with &&, and we don't have any pipes. And such a failing expression also does not trigger an exit, so the set +e/set -e were noops.
This commit is contained in:
committed by
Lennart Poettering
parent
19a04e8071
commit
13391986b5
@@ -31,21 +31,13 @@ portablectl "${ARGS[@]}" attach --now --runtime /usr/share/minimal_0.raw minimal
|
||||
|
||||
systemctl is-active minimal-app0.service
|
||||
systemctl is-active minimal-app0-foo.service
|
||||
set +o pipefail
|
||||
set +e
|
||||
systemctl is-active minimal-app0-bar.service && exit 1
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
portablectl "${ARGS[@]}" reattach --now --runtime /usr/share/minimal_1.raw minimal-app0
|
||||
|
||||
systemctl is-active minimal-app0.service
|
||||
systemctl is-active minimal-app0-bar.service
|
||||
set +o pipefail
|
||||
set +e
|
||||
systemctl is-active minimal-app0-foo.service && exit 1
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
portablectl list | grep -q -F "minimal_1"
|
||||
|
||||
@@ -55,28 +47,20 @@ portablectl list | grep -q -F "No images."
|
||||
|
||||
# portablectl also works with directory paths rather than images
|
||||
|
||||
unsquashfs -dest /tmp/minimal_0 /usr/share/minimal_0.raw
|
||||
unsquashfs -dest /tmp/minimal_1 /usr/share/minimal_1.raw
|
||||
unsquashfs -q -dest /tmp/minimal_0 /usr/share/minimal_0.raw
|
||||
unsquashfs -q -dest /tmp/minimal_1 /usr/share/minimal_1.raw
|
||||
|
||||
portablectl "${ARGS[@]}" attach --copy=symlink --now --runtime /tmp/minimal_0 minimal-app0
|
||||
|
||||
systemctl is-active minimal-app0.service
|
||||
systemctl is-active minimal-app0-foo.service
|
||||
set +o pipefail
|
||||
set +e
|
||||
systemctl is-active minimal-app0-bar.service && exit 1
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
portablectl "${ARGS[@]}" reattach --now --enable --runtime /tmp/minimal_1 minimal-app0
|
||||
|
||||
systemctl is-active minimal-app0.service
|
||||
systemctl is-active minimal-app0-bar.service
|
||||
set +o pipefail
|
||||
set +e
|
||||
systemctl is-active minimal-app0-foo.service && exit 1
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
portablectl list | grep -q -F "minimal_1"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user