summaryrefslogtreecommitdiff
path: root/update-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'update-test.sh')
-rwxr-xr-xupdate-test.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/update-test.sh b/update-test.sh
new file mode 100755
index 00000000..60359d48
--- /dev/null
+++ b/update-test.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+TEST="$1"
+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
+ ./tcpdump -n -t -r "$PREFIX/$input" $options >"$PREFIX/$output"
+done < $PREFIX/TESTLIST
+[ $MATCH = 0 ] && echo "test $TEST not found" >&2