File: test1.sh

package info (click to toggle)
dnscap 2.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,584 kB
  • sloc: ansic: 18,631; sh: 1,428; python: 1,162; makefile: 473; cpp: 306; perl: 169
file content (24 lines) | stat: -rwxr-xr-x 792 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh -xe

plugin=`find . -name 'asudp.so' | head -n 1`
if [ -z "$plugin" ]; then
    echo "Unable to find the asudp plugin"
    exit 1
fi

ln -s "$srcdir/../../src/test/dns.pcap" dns.pcap-dist || true

../../src/dnscap -r dns.pcap-dist -g -P "$plugin" -?
! ../../src/dnscap -r dns.pcap-dist -g -P "$plugin" -X

ln -s "$srcdir/../../src/test/dnso1tcp.pcap" dnso1tcp.pcap-dist || true
ln -s "$srcdir/../../src/test/dns6.pcap" dns6.pcap-dist || true

../../src/dnscap -T -r dnso1tcp.pcap-dist -w - -P "$plugin" | ../../src/dnscap -r - -g 2>test1.out
../../src/dnscap -T -r dns6.pcap-dist -w - -P "$plugin" | ../../src/dnscap -r - -g 2>>test1.out

mv test1.out test1.out.old
grep -v "^libgcov profiling error:" test1.out.old > test1.out
rm test1.out.old

diff test1.out "$srcdir/test1.gold"