test: timestamp messages in test scripts

The commonly used 'greenprint' function now adds a date + timestamp to
each message for debugging and tracking the duration of segments of each
scripts.
This commit is contained in:
Achilleas Koutsou 2021-10-19 16:49:02 +02:00 committed by Tom Gundersen
parent 03fe1337a5
commit aea77ed3de
16 changed files with 16 additions and 16 deletions

View file

@ -15,7 +15,7 @@ localectl set-locale LANG=en_US.UTF-8
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
function retry {

View file

@ -3,7 +3,7 @@ set -euo pipefail
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
# Get OS and architecture details.

View file

@ -3,7 +3,7 @@ set -euo pipefail
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
ALL_ARCHES="aarch64 ppc64le s390x x86_64"

View file

@ -5,7 +5,7 @@ source /usr/libexec/osbuild-composer-test/set-env-variables.sh
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
# Container image used for cloud provider CLI tools

View file

@ -9,7 +9,7 @@ HYPER_V_GEN="${HYPER_V_GEN:-V1}"
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
# Container image used for cloud provider CLI tools

View file

@ -17,7 +17,7 @@ fi
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
TEST_UUID=$(uuidgen)

View file

@ -9,7 +9,7 @@ source /usr/libexec/osbuild-composer-test/set-env-variables.sh
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
# modify existing kickstart by prepending and appending commands

View file

@ -8,7 +8,7 @@ source /usr/libexec/osbuild-composer-test/set-env-variables.sh
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
# Provision the software under test.

View file

@ -10,7 +10,7 @@ ARCH=$(uname -m)
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
# Start libvirtd and test it.

View file

@ -9,7 +9,7 @@ source /usr/libexec/osbuild-composer-test/set-env-variables.sh
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
# Install openshift client

View file

@ -10,7 +10,7 @@ ARCH=$(uname -m)
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
# Start libvirtd and test it.

View file

@ -10,7 +10,7 @@ ARCH=$(uname -m)
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
# Start firewalld

View file

@ -49,7 +49,7 @@ esac
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
function get_build_info() {

View file

@ -3,7 +3,7 @@
set -exuo pipefail
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
function generate_certificates {

View file

@ -5,7 +5,7 @@ source /usr/libexec/osbuild-composer-test/set-env-variables.sh
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
if [ "$ID" != "rhel" ]; then

View file

@ -21,7 +21,7 @@ fi
# Colorful output.
function greenprint {
echo -e "\033[1;32m${1}\033[0m"
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
}
# Start libvirtd and test it.