Whamcloud - gitweb
LU-18277 tests: Add missing env variable for acceptance-small 38/56538/3
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Mon, 30 Sep 2024 07:35:45 +0000 (03:35 -0400)
committerOleg Drokin <green@whamcloud.com>
Sun, 24 Nov 2024 06:06:49 +0000 (06:06 +0000)
Although LUSTRE and NAME is defined once auster is
called via test-framwork.sh inclusion. It is still
undefined at this point making running standalone
acceptance-small.sh to fail. This patch defines
missing env variable LUSTRE and NAME when running
standalone accpetance-small.sh

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ib540f4ce7d56f6205f4d9e43bbc3b9e6db94511b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56538
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <adeiter@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/acceptance-small.sh

index 0a73ba7..dcd071d 100755 (executable)
@@ -3,8 +3,11 @@
 # 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
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
+NAME=${NAME:-local} # name of config file eg lustre/tests/cfg/local.sh
 DEFAULT_SUITES="${*:-$ACC_SM_ONLY}"
 DEFAULT_SUITES="${DEFAULT_SUITES:-$(cat "$LUSTRE/tests/test-groups/regression")}"
+AUSTER=$LUSTRE/tests/auster
 
 for SUB in $DEFAULT_SUITES; do
        ENV=${SUB^^}
@@ -15,4 +18,12 @@ done
 
 echo "SUITES: $SUITES"
 
-./auster -r -R -v -f "${NAME:-lustre}" $SUITES
+# check config file is available
+if [ -e "$LUSTRE/tests/cfg/$NAME.sh" ]; then
+       echo "Running with config $LUSTRE/tests/cfg/${NAME}.sh"
+       $AUSTER -r -R -v -f "${NAME}" $SUITES
+else # fall back to default lustre.cfg
+       echo "Running with config $LUSTRE/tests/cfg/lustre.sh"
+       $AUSTER -r -R -v -f "lustre" $SUITES
+fi
+