make NFLOG test case conditional

Not all libpcap copies have the support for NFLOG (added in 2013), thus
only run the test when tcpdump was compiled for it.
This commit is contained in:
Denis Ovsienko 2014-04-23 23:47:41 +04:00
parent a2633f2f21
commit d491e08087
2 changed files with 11 additions and 2 deletions

View File

@ -179,8 +179,7 @@ geonet-calm-fast geonet_and_calm_fast.pcap geonet_and_calm_fast.out -t -vv -n
m3ua isup.pcap isup.out -t
m3ua-vv isup.pcap isupvv.out -t -vv
# NFLOG test case
nflog-e nflog.pcap nflog-e.out -t -e
# NFLOG test case moved to nflog-e.sh
# syslog test case
syslog-v syslog_udp.pcap syslog-v.out -t -v

10
tests/nflog-e.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
# NFLOG support depends on both DLT_NFLOG and working <pcap/nflog.h>
if grep '^#define HAVE_PCAP_NFLOG_H 1$' ../config.h >/dev/null
then
./TESTonce nflog-e nflog.pcap nflog-e.out '-t -e'
else
printf ' %-30s: TEST SKIPPED (compiled w/o NFLOG)\n' 'nflog-e'
fi