blob: 6ee18cae9e4f9fb03ed3ff82d285660d297ebbe5 [file] [log] [blame]
Elliott Hughes820eced2021-08-20 18:00:50 -07001#!/bin/sh
2
3# Update the tests given as positional parameters
4
5TZ=GMT0; export TZ
6
7for TEST in "$@"; do
8 PREFIX=tests
9 MATCH=0
10 while read name input output options
11 do
12 [ _$name = _ ] && continue # ignore empty lines
13 [ _${name#\#} != _$name ] && continue # ignore comment lines
14 [ $name != "$TEST" ] && continue # not the requested test
15 [ _$output = _ ] && continue # ignore incomplete lines
16 MATCH=1
17 ./tcpdump -# -n -r "$PREFIX/$input" $options >"$PREFIX/$output"
18 done < $PREFIX/TESTLIST
19 [ $MATCH = 0 ] && echo "test $TEST not found" >&2
20done