| # usage: rtpw_test <rtpw_commands> |
| # tests the rtpw sender and receiver functions |
| key=2b2edc5034f61a72345ca5986d7bfd0189aa6dc2ecab32fd9af74df6dfc6 |
| # First, we run "killall" to get rid of all existing rtpw processes. |
| # This step also enables this script to clean up after itself; if this |
| # script is interrupted after the rtpw processes are started but before |
| # they are killed, those processes will linger. Re-running the script |
| echo $0 ": starting rtpw receiver process... " |
| $RTPW $* $ARGS -r 0.0.0.0 $DEST_PORT & |
| echo $0 ": receiver PID = $receiver_pid" |
| # verify that the background job is running |
| ps | grep -q $receiver_pid |
| if [ $retval != 0 ]; then |
| echo $0 ": starting rtpw sender process..." |
| $RTPW $* $ARGS -s 127.0.0.1 $DEST_PORT & |
| echo $0 ": sender PID = $sender_pid" |
| # verify that the background job is running |
| if [ $retval != 0 ]; then |
| echo $0 ": done (test passed)" |
| echo "error: can't find executable" $RTPW |