Files
rk35xx-android14/external/tcpdump/update-test.sh
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

23 lines
722 B
Bash
Executable File

#!/bin/sh
# Update the tests given as positional parameters
TZ=GMT0; export TZ
for TEST in "$@"; do
PREFIX=tests
MATCH=0
while read -r name input output options
do
[ -z "$name" ] && continue # ignore empty lines
[ "${name#\#}" != "$name" ] && continue # ignore comment lines
[ "$name" != "$TEST" ] && continue # not the requested test
[ -z "$output" ] && continue # ignore incomplete lines
MATCH=1
# Word splitting is intentional for $options.
# shellcheck disable=SC2086
./tcpdump -# -n -r "$PREFIX/$input" $options >"$PREFIX/$output"
done < $PREFIX/TESTLIST
[ $MATCH = 0 ] && echo "test $TEST not found" >&2
done