1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-11 20:58:27 +03:00

test: Disable status messages when we start running a test

As soon as we start running a test, we want pid 1 to stop showing
status messages so let's tell pid 1 to stop showing status messages.
This commit is contained in:
Daan De Meyer 2025-03-03 12:33:56 +01:00
parent 854a8c21d0
commit 070de658a9

View File

@ -5,6 +5,8 @@ set -o pipefail
case "$1" in
setup)
busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager SetShowStatus s no
if [[ -f "$STATE_DIRECTORY/inprogress" ]]; then
exit 0
fi
@ -46,6 +48,8 @@ case "$1" in
touch "$STATE_DIRECTORY/inprogress"
;;
finalize)
busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager SetShowStatus s auto
# If we're rebooting, the test does a reboot as part of its execution and we shouldn't remove /inprogress.
if ! [[ "$(systemctl list-jobs)" =~ reboot.target|kexec.target|soft-reboot.target ]]; then
rm -f "$STATE_DIRECTORY/inprogress"