3
# usage: rtpw_test <rtpw_commands>
5
# tests the rtpw sender and receiver functions
11
key=2b2edc5034f61a72345ca5986d7bfd0189aa6dc2ecab32fd9af74df6dfc6
15
# First, we run "killall" to get rid of all existing rtpw processes.
16
# This step also enables this script to clean up after itself; if this
17
# script is interrupted after the rtpw processes are started but before
18
# they are killed, those processes will linger. Re-running the script
19
# will get rid of them.
21
killall rtpw 2&>/dev/null
23
if test -x $RTPW; then
25
echo $0 ": starting rtpw receiver process... "
27
$RTPW $* $ARGS -r 0.0.0.0 $DEST_PORT &
31
echo $0 ": receiver PID = $receiver_pid"
35
# verify that the background job is running
36
ps | grep -q $receiver_pid
39
if [ $retval != 0 ]; then
44
echo $0 ": starting rtpw sender process..."
46
$RTPW $* $ARGS -s 127.0.0.1 $DEST_PORT &
50
echo $0 ": sender PID = $sender_pid"
52
# verify that the background job is running
53
ps | grep -q $sender_pid
56
if [ $retval != 0 ]; then
66
echo $0 ": done (test passed)"
70
echo "error: can't find executable" $RTPW