2017-09-28 15:14:50 +08:00
|
|
|
#!/bin/sh
|
2018-05-03 18:26:30 +08:00
|
|
|
|
|
|
|
# Update the tests given as positional parameters
|
|
|
|
|
2018-08-04 14:46:17 +08:00
|
|
|
TZ=GMT0; export TZ
|
|
|
|
|
2018-05-03 18:26:30 +08:00
|
|
|
for TEST in "$@"; do
|
|
|
|
PREFIX=tests
|
|
|
|
MATCH=0
|
|
|
|
while read name input output options
|
|
|
|
do
|
|
|
|
[ _$name = _ ] && continue # ignore empty lines
|
|
|
|
[ _${name#\#} != _$name ] && continue # ignore comment lines
|
|
|
|
[ $name != "$TEST" ] && continue # not the requested test
|
|
|
|
[ _$output = _ ] && continue # ignore incomplete lines
|
|
|
|
MATCH=1
|
2018-08-04 14:46:17 +08:00
|
|
|
./tcpdump -# -n -r "$PREFIX/$input" $options >"$PREFIX/$output"
|
2018-05-03 18:26:30 +08:00
|
|
|
done < $PREFIX/TESTLIST
|
|
|
|
[ $MATCH = 0 ] && echo "test $TEST not found" >&2
|
|
|
|
done
|