Browse Source

!15248 Fix shellcheck warnings for cache shell scripts

From: @lixiachen
Reviewed-by: @pandoublefeng,@robingrosman
Signed-off-by: @robingrosman
pull/15248/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
f09df9ac2f
3 changed files with 8 additions and 8 deletions
  1. +1
    -1
      tests/ut/python/cachetests/cachetest.sh
  2. +2
    -2
      tests/ut/python/cachetests/cachetest_cpp.sh
  3. +5
    -5
      tests/ut/python/cachetests/cachetest_lib.sh

+ 1
- 1
tests/ut/python/cachetests/cachetest.sh 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"


+ 2
- 2
tests/ut/python/cachetests/cachetest_cpp.sh 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


+ 5
- 5
tests/ut/python/cachetests/cachetest_lib.sh 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
}



Loading…
Cancel
Save