From 25d6e3ca637d0239f9061636df7bcbbd9b769f13 Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Thu, 8 Dec 2022 19:09:38 +0000 Subject: [PATCH] LU-15626 tests: Fix shellcheck warning for acceptance-small This patch addresses the warning and style suggestions reported by shellcheck. The patch also ensures that all spaces have been moved to tabs, and the script now logs what test suites are about to be run. Signed-off-by: Timothy Day Change-Id: Ia88758d0bf89e7d0aa67dfae31d969c780507b88 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49350 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- lustre/tests/acceptance-small.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh index c262d0f..0a73ba7 100755 --- a/lustre/tests/acceptance-small.sh +++ b/lustre/tests/acceptance-small.sh @@ -3,11 +3,16 @@ # usage: acceptance-small.sh [test list] # if no tests are specified, they are taken from test-groups/regression # if {TEST_NAME}=no is set, that test script is skipped -DEFAULT_SUITES="${@:-$ACC_SM_ONLY}" -DEFAULT_SUITES="${DEFAULT_SUITES:-$(cat $LUSTRE/tests/test-groups/regression)}" +DEFAULT_SUITES="${*:-$ACC_SM_ONLY}" +DEFAULT_SUITES="${DEFAULT_SUITES:-$(cat "$LUSTRE/tests/test-groups/regression")}" + for SUB in $DEFAULT_SUITES; do - ENV=$(echo $SUB | tr "[:lower:]-" "[:upper:]_") - [ "$(eval echo \$$ENV)" = "no" ] && continue + ENV=${SUB^^} + ENV=${ENV//-/_} + [[ "${!ENV}" != "no" ]] || continue SUITES="$SUITES $SUB" done -./auster -r -R -v -f ${NAME:-lustre} $SUITES + +echo "SUITES: $SUITES" + +./auster -r -R -v -f "${NAME:-lustre}" $SUITES -- 1.8.3.1