Fix shellcheck warnings

This commit is contained in:
Lixia Chen 2021-04-15 09:33:07 -04:00
parent fcac556d58
commit 91f9059263
3 changed files with 8 additions and 8 deletions

View File

@ -15,7 +15,7 @@
# ============================================================================
# This script is the driver of the individual test scenarios
CURRPATH=$(cd "$(dirname $0)"; pwd)
CURRPATH=$(cd "$(dirname $0)" || exit; pwd)
echo "----------------------------------------------"
echo "Invalid syntax and cache_admin failure testing"

View File

@ -47,7 +47,7 @@ HandleRcExit $? 1 1
export SESSION_ID=$session_id
test_count=$(($test_count+1))
cd ${UT_TEST_DIR}
cd ${UT_TEST_DIR} || exit
cmd="${UT_TEST_DIR}/ut_tests"
echo "Test ${test_count}: ${cmd}"
MsgEnter "Run test ${test_count}"
@ -62,7 +62,7 @@ fi
echo
HandleRcExit $rc 1 0
cd ${CURRPATH}
cd ${CURRPATH} || exit
StopServer
HandleRcExit $? 1 0

View File

@ -18,9 +18,9 @@
# test scenarios for cache op testing.
# Set any path variables here
CURRPATH=$(cd "$(dirname $0)"; pwd)
TESTPATH=$(cd "${CURRPATH}/../dataset"; pwd)
PROJECT_PATH=$(cd "${CURRPATH}/../../../../"; pwd)
CURRPATH=$(cd "$(dirname $0)" || exit; pwd)
TESTPATH=$(cd "${CURRPATH}/../dataset" || exit; pwd)
PROJECT_PATH=$(cd "${CURRPATH}/../../../../" || exit; pwd)
if [ "x${BUILD_PATH}" == "x" ]; then
BUILD_PATH=${PROJECT_PATH}/build
@ -202,13 +202,13 @@ PytestCmd()
if [ ${rc} -ne 0 ]; then
MsgFail "FAILED"
MsgError "pytest call had failure!" "${rc}" "${result}"
cd ${CURRPATH}
cd ${CURRPATH} || exit
return 1
else
MsgOk "OK"
fi
echo
cd ${CURRPATH}
cd ${CURRPATH} || exit
return 0
}