check_fakewap.sh
资源名称:gateway-1.2.1 [点击查看]
上传用户:gzpyjq
上传日期:2013-01-31
资源大小:1852k
文件大小:1k
源码类别:
手机WAP编程
开发平台:
WINDOWS
- #!/bin/sh
- #
- # Use `test/fakewap' to test the bearerbox and the wapbox.
- set -e
- #set -x
- times=10
- port=8040
- url="http://localhost:$port/hello.wml"
- loglevel=0
- test/test_http_server -f test/hello.wml -p $port > check_http.log 2>&1 &
- httppid=$!
- sleep 1
- gw/bearerbox -v $loglevel gw/wapkannel.conf > check_bb.log 2>&1 &
- bbpid=$!
- sleep 2
- gw/wapbox -v $loglevel gw/wapkannel.conf > check_wap.log 2>&1 &
- wappid=$!
- sleep 2
- test/fakewap -m $times $url > check_fake.log 2>&1
- ret=$?
- test/test_http -qv 4 http://localhost:$port/quit
- kill -INT $bbpid
- wait
- if [ "$ret" != 0 ]
- then
- echo check_fakewap failed 1>&2
- echo See check_bb.log, check_wap.log, check_fake.log, 1>&2
- echo check_http.log for info 1>&2
- exit 1
- fi
- rm check_bb.log check_wap.log check_fake.log check_http.log
- exit 0