]> The Tcpdump Group git mirrors - tcpdump/blob - update-test.sh
CI: Add warning exemptions for Sun C (suncc-5.14) on Solaris 10
[tcpdump] / update-test.sh
1 #!/bin/sh
2
3 # Update the tests given as positional parameters
4
5 TZ=GMT0; export TZ
6
7 for TEST in "$@"; do
8 PREFIX=tests
9 MATCH=0
10 while read -r name input output options
11 do
12 [ -z "$name" ] && continue # ignore empty lines
13 [ "${name#\#}" != "$name" ] && continue # ignore comment lines
14 [ "$name" != "$TEST" ] && continue # not the requested test
15 [ -z "$output" ] && continue # ignore incomplete lines
16 MATCH=1
17 # Word splitting is intentional for $options.
18 # shellcheck disable=SC2086
19 ./tcpdump -# -n -tttt -r "$PREFIX/$input" $options >"$PREFIX/$output"
20 done < $PREFIX/TESTLIST
21 [ $MATCH = 0 ] && echo "test $TEST not found" >&2
22 done