File: test-dbus-proxy.sh

package info (click to toggle)
libwebsockets 4.3.5-3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 31,404 kB
  • sloc: ansic: 194,409; javascript: 1,550; sh: 1,387; cpp: 505; java: 461; perl: 405; xml: 118; makefile: 76; awk: 5
file content (34 lines) | stat: -rwxr-xr-x 466 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

echo "Starting $0"

bin/lws-minimal-dbus-ws-proxy 2> /tmp/dbuss&

echo "  server starting"
sleep 1s
PID_PROX=$!

echo "  client starting"
bin/lws-minimal-dbus-ws-proxy-testclient -x 10 2> /tmp/dbusc
R=$?

kill -2 $PID_PROX

if [ $R -ne 0 ] ; then
	echo "$0 FAILED"
	cat /tmp/dbuss
	cat /tmp/dbusc
	exit 1
fi

if [ -z "`cat /tmp/dbusc | grep 'rx: 9, tx: 9'`" ] ; then
	echo "$0 FAILED"
	cat /tmp/dbuss
	cat /tmp/dbusc
	exit 1
fi

echo "$0 PASSED"

exit 0