fix bug of runtest.sh when run ut python

This commit is contained in:
xsmq 2021-03-16 22:21:42 +08:00
parent bf6da44f84
commit d7eeed0b27
1 changed files with 16 additions and 11 deletions

View File

@ -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
# Run cpp testcases
cd ${CURR_PATH}/cpp
bash runtest.sh
fi