• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/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
21