From d7eeed0b27facea407ee50cdb8edd776630224d3 Mon Sep 17 00:00:00 2001 From: xsmq Date: Tue, 16 Mar 2021 22:21:42 +0800 Subject: [PATCH] fix bug of runtest.sh when run ut python --- tests/{ => ut}/runtest.sh | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) rename tests/{ => ut}/runtest.sh (67%) diff --git a/tests/runtest.sh b/tests/ut/runtest.sh similarity index 67% rename from tests/runtest.sh rename to tests/ut/runtest.sh index 24db8d87df9..782359a3e83 100755 --- a/tests/runtest.sh +++ b/tests/ut/runtest.sh @@ -16,21 +16,26 @@ set -e -CURRPATH=$(cd "$(dirname $0)"; pwd) +CURR_PATH=$(cd "$(dirname $0)"; pwd) if [ $# -gt 0 ]; then if [ $1 == "python" ]; then - echo "run python ut" - bash ${CURRPATH}/ut/python/runtest.sh $2 + echo "Run ut python." + cd ${CURR_PATH}/python + bash runtest.sh $2 elif [ $1 == "cpp" ]; then - echo "run cpp ut" - bash ${CURRPATH}/ut/cpp/runtest.sh + echo "Run ut cpp." + cd ${CURR_PATH}/cpp + bash runtest.sh fi else - echo "run all ut" - # 1.run python testcases - bash ${CURRPATH}/ut/python/runtest.sh $2 + echo "Run all ut." + + # Run python testcases + cd ${CURR_PATH}/python + bash runtest.sh $2 - # 2.run c++ ut testcases - bash ${CURRPATH}/ut/cpp/runtest.sh -fi \ No newline at end of file + # Run cpp testcases + cd ${CURR_PATH}/cpp + bash runtest.sh +fi