ci: pass shutdown fold description to fold command

For displaying a coloured title for the shutdown section in the logs,
instead of having the colour control codes directly written in run.sh,
we can pass the section title as an argument to "travis_fold()" and have
it format and print it for us.

This is cleaner, and slightly more in-line with what we do in the CI
files of the vmtest repository.
This commit is contained in:
Quentin Monnet 2021-11-16 10:25:55 +00:00 committed by Andrii Nakryiko
parent 94a49850c5
commit eab19ffead

View File

@ -475,12 +475,11 @@ guestfish --remote \
upload "$tmp" /etc/rcS.d/S50-run-tests : \
chmod 755 /etc/rcS.d/S50-run-tests
fold_shutdown="$(travis_fold start shutdown)"
fold_shutdown="$(travis_fold start shutdown Shutdown)"
cat <<HERE >"$tmp"
#!/bin/sh
echo ${fold_shutdown}
echo -e '\033[1;33mShutdown\033[0m\n'
echo -e '${fold_shutdown}'
poweroff
HERE