From 6ce329547e6e77a1ac7e37591f18fb3813ca23d8 Mon Sep 17 00:00:00 2001 From: Arshad Hussain Date: Mon, 30 Sep 2024 03:35:45 -0400 Subject: [PATCH] LU-18277 tests: Add missing env variable for acceptance-small 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 Change-Id: Ib540f4ce7d56f6205f4d9e43bbc3b9e6db94511b Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56538 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alex Deiter Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/tests/acceptance-small.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh index 0a73ba7..dcd071d 100755 --- a/lustre/tests/acceptance-small.sh +++ b/lustre/tests/acceptance-small.sh @@ -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 + -- 1.8.3.1