From a28947bb8266ed6b76de959deaba485c8ed85ef5 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Sun, 20 Dec 2020 17:08:18 +0000 Subject: [PATCH] ci: give an overview of the current CI environment As CRIU is using multiple different CI systems this adds a printout to each CI run about the CI environment for easier debugging of possible errors. Also use V=1 to build CRIU and the tests to easily see which compiler and which options are used. Signed-off-by: Adrian Reber --- scripts/ci/run-ci-tests.sh | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/scripts/ci/run-ci-tests.sh b/scripts/ci/run-ci-tests.sh index 42062aee9..29711d3c3 100755 --- a/scripts/ci/run-ci-tests.sh +++ b/scripts/ci/run-ci-tests.sh @@ -95,6 +95,36 @@ test_stream() { ./test/zdtm.py run --stream -p 2 --keep-going -T "$STREAM_TEST_PATTERN" $ZDTM_OPTS } +print_header() { + echo "############### $1 ###############" +} + +print_env() { + # As this script can run on multiple different CI systems + # the following lines should give some context to the + # evnvironment of this CI run. + print_header "Environment variables" + printenv + print_header "uname -a" + uname -a || : + print_header "Mounted file systems" + mount || : + print_header "Kernel command line" + cat /proc/cmdline || : + print_header "Distribution information" + [ -e /etc/lsb-release ] && cat /etc/lsb-release + [ -e /etc/redhat-release ] && cat /etc/redhat-release + [ -e /etc/alpine-release ] && cat /etc/alpine-release + print_header "ulimit -a" + ulimit -a + print_header "Available memory" + free -h + print_header "Available CPUs" + lscpu || : +} + +print_env + ci_prep if [ "$CLANG" = "1" ]; then @@ -103,9 +133,9 @@ if [ "$CLANG" = "1" ]; then export LDFLAGS fi -export GCOV +export GCOV CC $CC --version -time make CC="$CC" -j4 +time make CC="$CC" -j4 V=1 ./criu/criu -v4 cpuinfo dump || : ./criu/criu -v4 cpuinfo check || : @@ -148,7 +178,7 @@ if [ "${COMPAT_TEST}x" = "yx" ] ; then mv "$REFUGE"/* /usr/lib/x86_64-linux-gnu/ fi -time make CC="$CC" -j4 -C test/zdtm +time make CC="$CC" -j4 -C test/zdtm V=1 [ -f "$CCACHE_LOGFILE" ] && cat "$CCACHE_LOGFILE"