]> The Tcpdump Group git mirrors - tcpdump/blob - update-test.sh
Use more the ND_TCHECK_1() macro
[tcpdump] / update-test.sh
1 #!/bin/sh
2 TEST="$1"
3 PREFIX=tests
4 MATCH=0
5 while read name input output options
6 do
7 [ _$name = _ ] && continue # ignore empty lines
8 [ _${name#\#} != _$name ] && continue # ignore comment lines
9 [ $name != "$TEST" ] && continue # not the requested test
10 [ _$output = _ ] && continue # ignore incomplete lines
11 MATCH=1
12 ./tcpdump -n -t -r "$PREFIX/$input" $options >"$PREFIX/$output"
13 done < $PREFIX/TESTLIST
14 [ $MATCH = 0 ] && echo "test $TEST not found" >&2