diff --git a/doc/BERT_10_MINS.md b/doc/BERT_10_MINS.md index e5faed74340b4256b1b8796eff382f2fd6312034..e668b3207c5228309d131e2353e815d26c8d4625 100644 --- a/doc/BERT_10_MINS.md +++ b/doc/BERT_10_MINS.md @@ -95,7 +95,8 @@ sh pip_app.sh python bert_10.py sh server.sh & 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 echo "test success" else diff --git a/tools/doc_test.sh b/tools/doc_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..c76656bc691fbd4c191f234c9cec13f6bb272527 --- /dev/null +++ b/tools/doc_test.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + + +function main() { + cat Serving/doc/doc_test_list | xargs python Serving/tools/doc_tester_reader.py Serving/doc/ + +} + + +main $@ diff --git a/tools/doc_tester_reader.py b/tools/doc_tester_reader.py index c2cf0fdcf886de350b5523615a10c902e2d82339..07816e70f8c0865c87bdece77be908e211f2821f 100644 --- a/tools/doc_tester_reader.py +++ b/tools/doc_tester_reader.py @@ -58,7 +58,8 @@ def GetTestFile(lines, i, filename): def RunTest(): folder = 'test' os.system('cd ' + folder + ' && sh start.sh') + os.system('cd .. && rm -rf ' + folder) if __name__ == '__main__': - ReadMarkDown(sys.argv[1]) + ReadMarkDown(os.path.join(sys.argv[1], sys.argv[2])) RunTest()