]> The Tcpdump Group git mirrors - tcpdump/blob - tests/isis-seg-fault-1-v.sh
Fix a bug in test scripts (exposed in GH #613).
[tcpdump] / tests / isis-seg-fault-1-v.sh
1 #!/bin/sh
2
3 # This "verbose" ISIS protocol test involves a float calculation that
4 # may produce a slightly different result if the compiler is not GCC.
5 # Test only with GCC (similar to GitHub issue #333).
6
7 exitcode=0
8 test_name=isis-seg-fault-1-v
9
10 if [ ! -f ../Makefile ]
11 then
12 printf ' %-35s: TEST SKIPPED (no Makefile)\n' $test_name
13 elif grep '^CC = .*gcc' ../Makefile >/dev/null
14 then
15 ./TESTonce $test_name isis-seg-fault-1.pcap isis-seg-fault-1-v.out '-v'
16 [ $? -eq 0 ] || exitcode=1
17 else
18 printf ' %-35s: TEST SKIPPED (compiler is not GCC)\n' $test_name
19 fi
20
21 exit $exitcode