Travis-CI: Run test suite as super user, avoid sudo from within test

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-10-31 10:46:49 +01:00
parent 1c14168558
commit 3f5ae0e861
2 changed files with 4 additions and 4 deletions

View File

@ -16,6 +16,6 @@ script:
- ./configure --prefix=/tmp/sysklogd
- make clean
- make -j5
- make check || (cat test/test-suite.log; false)
- sudo make check || (cat test/test-suite.log; false)
- make install-strip
- tree /tmp/sysklogd

View File

@ -6,8 +6,8 @@ MSG="kilroy"
/sbin/ifconfig -a
sudo tshark -Qni lo -w ${CAP} port ${PORT} &
#sudo tcpdump -qlni lo -w ${CAP} port ${PORT} &
tshark -Qni lo -w ${CAP} port ${PORT} &
#tcpdump -qlni lo -w ${CAP} port ${PORT} &
PID="$!"
sleep 5
ps fax |grep -A3 tshark
@ -15,7 +15,7 @@ ps fax |grep -A3 tshark
../src/logger -u ${SOCK} ${MSG}
sleep 5
sudo kill -TERM ${PID}
kill -TERM ${PID}
wait ${PID}
tshark -d udp.port==${PORT},syslog -r ${CAP} | grep ${MSG}