Add win32 directory to EXTRA_DIST
[sipe-libnice.git] / tests / check-test-fullmode-with-stun.sh
blob4ce082e51e5743efcfd458517a7cca4301a32687
1 #! /bin/sh
3 STUND=../stun/tools/stund
5 echo "Starting ICE full-mode with STUN unit test."
7 [ -e "$STUND" ] || {
8 echo "STUN server not found: Cannot run unit test!" >&2
9 exit 77
12 set -x
13 pidfile=./stund.pid
15 export NICE_STUN_SERVER=127.0.0.1
16 export NICE_STUN_SERVER_PORT=3800
18 echo "Launching stund on port ${NICE_STUN_SERVER_PORT}."
20 rm -f -- "$pidfile"
21 (sh -c "echo \$\$ > \"$pidfile\" && exec "$STUND" ${NICE_STUN_SERVER_PORT}") &
22 sleep 1
24 ./test-fullmode
25 error=$?
27 kill "$(cat "$pidfile")"
28 rm -f -- "$pidfile"
29 wait
30 exit ${error}