From 5c9230f68911d1e6d3a977e09ec2c4ca72197036 Mon Sep 17 00:00:00 2001 From: Jo Zzsi Date: Sat, 2 Aug 2025 13:30:43 -0400 Subject: [PATCH] test: use "set -u" in in test-container.sh To make testing more robust, use `set -u`. --- test/test-container.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test-container.sh b/test/test-container.sh index 81e41c951..e38c25f50 100755 --- a/test/test-container.sh +++ b/test/test-container.sh @@ -8,7 +8,7 @@ if command -v systemd-detect-virt > /dev/null && ! systemd-detect-virt -c &> /de exit 1 fi -set -e +set -eu if [ "${V-}" = "2" ]; then set -x; fi [[ -d ${0%/*} ]] && cd "${0%/*}"/../ @@ -22,11 +22,11 @@ if [ "${V-}" = "2" ]; then set -x; fi ) # disable building documentation by default -[ -z "$enable_documentation" ] && export enable_documentation=no +[ -z "${enable_documentation-}" ] && export enable_documentation=no # shellcheck disable=SC2086 -./configure --enable-test $CONFIGURE_ARG +./configure --enable-test ${CONFIGURE_ARG-} # treat warnings as error # shellcheck disable=SC2086 -CFLAGS="-Wextra -Werror" make TEST_RUN_ID="${TEST_RUN_ID:=$1}" TESTS="${TESTS:=$2}" V="${V:=1}" $MAKEFLAGS ${TARGETS:=all install check} +CFLAGS="-Wextra -Werror" make TEST_RUN_ID="${TEST_RUN_ID:=$1}" TESTS="${TESTS:=$2}" V="${V:=1}" ${MAKEFLAGS-} ${TARGETS:=all install check} -- 2.47.3