Whamcloud - gitweb
LU-15626 tests: Fix shellcheck warning for acceptance-small 50/49350/5
authorTimothy Day <timday@amazon.com>
Thu, 8 Dec 2022 19:09:38 +0000 (19:09 +0000)
committerOleg Drokin <green@whamcloud.com>
Sat, 7 Jan 2023 07:57:12 +0000 (07:57 +0000)
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 <timday@amazon.com>
Change-Id: Ia88758d0bf89e7d0aa67dfae31d969c780507b88
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49350
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/acceptance-small.sh

index c262d0f..0a73ba7 100755 (executable)
@@ -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