diff --git a/test/remote.sh b/test/remote.sh index 309cea9..d2b4bea 100755 --- a/test/remote.sh +++ b/test/remote.sh @@ -4,20 +4,23 @@ set -ex MSG="kilroy" -/sbin/ifconfig -a - +# Start collector in background, note: might need sudo! tshark -Qni lo -w ${CAP} port ${PORT} & -#tcpdump -qlni lo -w ${CAP} port ${PORT} & PID="$!" -sleep 1 -ps fax |grep -A3 tshark + +# Wait for tshark to start up properly +sleep 2 ../src/logger -u ${SOCK} ${MSG} -sleep 1 +# Wait for any OS delays, in particular on Travis +sleep 2 + +# Stop tshark collector kill -TERM ${PID} wait ${PID} +# Analyze content, should have $MSG now ... tshark -d udp.port==${PORT},syslog -r ${CAP} | grep ${MSG} rm ${CAP}