提交 20010c1d 编写于 作者: Y Your Name

update test script

上级 10ebca4a
...@@ -15,9 +15,9 @@ function check_cmd() { ...@@ -15,9 +15,9 @@ function check_cmd() {
} }
function build_client() { function build_client() {
local TYPE=$1 local TYPE=$1 # pwd: /Serving
local DIRNAME=build-client-$TYPE local DIRNAME=build-client-$TYPE
mkdir $DIRNAME && cd $DIRNAME mkdir $DIRNAME && cd $DIRNAME # pwd: /Serving/build-client-$TYPE
case $TYPE in case $TYPE in
CPU|GPU) CPU|GPU)
cmake -DPYTHON_INCLUDE_DIR=$PYTHONROOT/include/python2.7/ \ cmake -DPYTHON_INCLUDE_DIR=$PYTHONROOT/include/python2.7/ \
...@@ -33,14 +33,14 @@ function build_client() { ...@@ -33,14 +33,14 @@ function build_client() {
;; ;;
esac esac
echo "build client $TYPE part finished as expected." echo "build client $TYPE part finished as expected."
cd .. cd .. # pwd: /Serving
rm -rf $DIRNAME rm -rf $DIRNAME
} }
function build_server() { function build_server() {
local TYPE=$1 local TYPE=$1 # pwd: /Serving
local DIRNAME=build-server-$TYPE local DIRNAME=build-server-$TYPE
mkdir $DIRNAME && cd $DIRNAME mkdir $DIRNAME && cd $DIRNAME # pwd: /Serving/build-server-$TYPE
case $TYPE in case $TYPE in
CPU) CPU)
cmake -DPYTHON_INCLUDE_DIR=$PYTHONROOT/include/python2.7/ \ cmake -DPYTHON_INCLUDE_DIR=$PYTHONROOT/include/python2.7/ \
...@@ -65,7 +65,7 @@ function build_server() { ...@@ -65,7 +65,7 @@ function build_server() {
;; ;;
esac esac
echo "build server $TYPE part finished as expected." echo "build server $TYPE part finished as expected."
cd .. cd .. # pwd: /Serving
# rm -rf $DIRNAME for export SERVING_BIN # rm -rf $DIRNAME for export SERVING_BIN
} }
...@@ -74,7 +74,8 @@ function kill_server_process() { ...@@ -74,7 +74,8 @@ function kill_server_process() {
} }
function python_test_fit_a_line() { function python_test_fit_a_line() {
cd fit_a_line # pwd: /Serving/python/examples
cd fit_a_line # pwd: /Serving/python/examples/fit_a_line
sh get_data.sh sh get_data.sh
local TYPE=$1 local TYPE=$1
case $TYPE in case $TYPE in
...@@ -123,25 +124,25 @@ function python_test_fit_a_line() { ...@@ -123,25 +124,25 @@ function python_test_fit_a_line() {
esac esac
echo "test fit_a_line $TYPE part finished as expected." echo "test fit_a_line $TYPE part finished as expected."
rm -rf image kvdb log uci_housing* work* rm -rf image kvdb log uci_housing* work*
cd .. cd .. # pwd: /Serving/python/examples
} }
function python_run_test() { function python_run_test() {
# Using the compiled binary # Using the compiled binary
local TYPE=$1 local TYPE=$1 # pwd: /Serving
export SERVING_BIN=$PWD/build-server-${TYPE}/core/general-server/serving export SERVING_BIN=$PWD/build-server-${TYPE}/core/general-server/serving
cd python/examples cd python/examples # pwd: /Serving/python/examples
python_test_fit_a_line $TYPE python_test_fit_a_line $TYPE # pwd: /Serving/python/examples
echo "test python $TYPE part finished as expected." echo "test python $TYPE part finished as expected."
cd ../.. cd ../.. # pwd: /Serving
} }
function main() { function main() {
local TYPE=$1 local TYPE=$1 # pwd: /
init init # pwd: /Serving
build_client $TYPE build_client $TYPE # pwd: /Serving
build_server $TYPE build_server $TYPE # pwd: /Serving
python_run_test $TYPE python_run_test $TYPE # pwd: /Serving
echo "serving $TYPE part finished as expected." echo "serving $TYPE part finished as expected."
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册