提交 f42505c0 编写于 作者: W wuzewu

update the test case run script to support specify a test case list file

上级 fda184fd
...@@ -9,7 +9,8 @@ os: ...@@ -9,7 +9,8 @@ os:
- linux - linux
script: script:
- sh ./scripts/test_all_case.sh - sh ./scripts/test_all_case.sh ./tests/tclist_all
- sh ./scripts/check_code_style.sh
notifications: notifications:
email: email:
......
#!/bin/bash #!/bin/bash
set -o errexit set -o errexit
function usage() {
echo "usage: sh $0 {test_case_list_file}"
}
if [ $# -lt 1 ]
then
usage
exit 1
fi
listfile=$1
base_path=$(cd `dirname $0`/..; pwd) base_path=$(cd `dirname $0`/..; pwd)
test_case_path=${base_path}/tests test_case_path=${base_path}/tests
export PYTHONPATH=$base_path:$PYTHONPATH export PYTHONPATH=$base_path:$PYTHONPATH
# install the require package
cd ${base_path} cd ${base_path}
pip install -r requirements.txt pip install -r requirements.txt
cd ${test_case_path}
# only run python test case # run all case list in the {listfile}
for test_file in `ls | grep \.py` cd ${test_case_path}
for test_file in `cat $listfile`
do do
python $test_file python ${test_file}.py
done done
test_downloader
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册