test/cases: properly kill journal for installers.sh
CI gets stuck if we don't kill the journal watcher on exit.
See bc1a7dc30c for more info.
This commit is contained in:
parent
35fd20c0de
commit
98f5623914
1 changed files with 4 additions and 1 deletions
|
|
@ -166,6 +166,8 @@ build_image() {
|
|||
WORKER_UNIT=$(sudo systemctl list-units | grep -o -E "osbuild.*worker.*\.service")
|
||||
sudo journalctl -af -n 1 -u "${WORKER_UNIT}" &
|
||||
WORKER_JOURNAL_PID=$!
|
||||
# Stop watching the worker journal when exiting.
|
||||
trap 'sudo pkill -P ${WORKER_JOURNAL_PID}' EXIT
|
||||
|
||||
# Start the compose.
|
||||
greenprint "🚀 Starting compose"
|
||||
|
|
@ -206,8 +208,9 @@ build_image() {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Stop watching the worker journal.
|
||||
# Kill the journal monitor immediately and remove the trap
|
||||
sudo pkill -P ${WORKER_JOURNAL_PID}
|
||||
trap - EXIT
|
||||
}
|
||||
|
||||
# Wait for the ssh server up to be.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue