test/shared_lib.sh: make *print functions print to stderr

This will allow using them inside Bash function that return values,
without tainting the returned value.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2025-03-18 13:26:31 +01:00 committed by Simon de Vlieger
parent 856bdd3c74
commit b010a855f6

View file

@ -35,13 +35,13 @@ function get_build_info() {
# Colorful timestamped output.
function greenprint {
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m" >&2
}
function yellowprint {
echo -e "\033[1;33m[$(date -Isecond)] ${1}\033[0m"
echo -e "\033[1;33m[$(date -Isecond)] ${1}\033[0m" >&2
}
function redprint {
echo -e "\033[1;31m[$(date -Isecond)] ${1}\033[0m"
echo -e "\033[1;31m[$(date -Isecond)] ${1}\033[0m" >&2
}