提交 226b464c 编写于 作者: W wangjiawei04

add doc test first example

上级 f105207d
...@@ -95,7 +95,8 @@ sh pip_app.sh ...@@ -95,7 +95,8 @@ sh pip_app.sh
python bert_10.py python bert_10.py
sh server.sh & sh server.sh &
wget https://paddle-serving.bj.bcebos.com/bert_example/data-c.txt --no-check-certificate wget https://paddle-serving.bj.bcebos.com/bert_example/data-c.txt --no-check-certificate
cat data-c.txt | python bert_client.py head -n 500 data-c.txt > data.txt
cat data.txt | python bert_client.py
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
echo "test success" echo "test success"
else else
......
#!/usr/bin/env bash
function main() {
cat Serving/doc/doc_test_list | xargs python Serving/tools/doc_tester_reader.py Serving/doc/
}
main $@
...@@ -58,7 +58,8 @@ def GetTestFile(lines, i, filename): ...@@ -58,7 +58,8 @@ def GetTestFile(lines, i, filename):
def RunTest(): def RunTest():
folder = 'test' folder = 'test'
os.system('cd ' + folder + ' && sh start.sh') os.system('cd ' + folder + ' && sh start.sh')
os.system('cd .. && rm -rf ' + folder)
if __name__ == '__main__': if __name__ == '__main__':
ReadMarkDown(sys.argv[1]) ReadMarkDown(os.path.join(sys.argv[1], sys.argv[2]))
RunTest() RunTest()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册