]> The Tcpdump Group git mirrors - tcpdump/blob - tests/lmp-v.sh
Fix tpyo.
[tcpdump] / tests / lmp-v.sh
1 #!/bin/sh
2
3 # The "verbose" Link Management Protocol test involves a float calculation that
4 # may produce a slightly different result depending on the architecture and the
5 # compiler (see GitHub issue #333). The reference output was produced using a
6 # GCC build and must reproduce correctly on any other GCC build regardless of
7 # the architecture.
8
9 srcdir=${SRCDIR-.}
10
11 exitcode=0
12
13 # A Windows build may have no file named Makefile and also a version of grep
14 # that won't return an error when the file does not exist. Work around.
15 if [ ! -f ../Makefile ]
16 then
17 printf ' %-35s: TEST SKIPPED (no Makefile)\n' 'lmp-v'
18 elif grep '^CC = .*gcc' ../Makefile >/dev/null
19 then
20 passed=`cat .passed`
21 failed=`cat .failed`
22 if ${srcdir}/tests/TESTonce lmp-v ${srcdir}/tests/lmp.pcap ${srcdir}/tests/lmp-v.out '-T lmp -v'
23 then
24 passed=`expr $passed + 1`
25 echo $passed >.passed
26 else
27 failed=`expr $failed + 1`
28 echo $failed >.failed
29 exitcode=1
30 fi
31 else
32 printf ' %-35s: TEST SKIPPED (compiler is not GCC)\n' 'lmp-v'
33 fi
34
35 exit $exitcode