From d491e080870c8fa91d1c158d135afbe37a93fd5e Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Wed, 23 Apr 2014 23:47:41 +0400 Subject: [PATCH] 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. --- tests/TESTLIST | 3 +-- tests/nflog-e.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 tests/nflog-e.sh diff --git a/tests/TESTLIST b/tests/TESTLIST index 6726fa52..91a24d04 100644 --- a/tests/TESTLIST +++ b/tests/TESTLIST @@ -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 diff --git a/tests/nflog-e.sh b/tests/nflog-e.sh new file mode 100755 index 00000000..00ac4fd0 --- /dev/null +++ b/tests/nflog-e.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# NFLOG support depends on both DLT_NFLOG and working + +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