mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-21 13:42:15 +08:00
22 lines
347 B
Bash
22 lines
347 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
PROG=$1
|
||
|
PORT=8002
|
||
|
|
||
|
cleanup() {
|
||
|
kill -9 $PID >/dev/null 2>&1
|
||
|
}
|
||
|
|
||
|
#set -x
|
||
|
trap cleanup EXIT
|
||
|
|
||
|
cleanup
|
||
|
$PROG -p $PORT -b /api/ 127.0.0.1:8000 &
|
||
|
PID=$!
|
||
|
|
||
|
# Perform api_server unit test through the load balancer by passing
|
||
|
# load balancer port to the unit test script
|
||
|
(cd ../api_server && make && sh unit_test.sh ./api_server $PORT)
|
||
|
|
||
|
exit $?
|