isis-seg-fault-1-v.sh 734 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. # This "verbose" ISIS protocol test involves a float calculation that
  3. # may produce a slightly different result if the compiler is not GCC.
  4. # Test only with GCC (similar to GitHub issue #333).
  5. exitcode=0
  6. test_name=isis-seg-fault-1-v
  7. if [ ! -f ../Makefile ]
  8. then
  9. printf ' %-35s: TEST SKIPPED (no Makefile)\n' $test_name
  10. elif grep '^CC = .*gcc' ../Makefile >/dev/null
  11. then
  12. passed=`cat .passed`
  13. failed=`cat .failed`
  14. if ./TESTonce $test_name isis-seg-fault-1.pcap isis-seg-fault-1-v.out '-v'
  15. then
  16. passed=`expr $passed + 1`
  17. echo $passed >.passed
  18. else
  19. failed=`expr $failed + 1`
  20. echo $failed >.failed
  21. exitcode=1
  22. fi
  23. else
  24. printf ' %-35s: TEST SKIPPED (compiler is not GCC)\n' $test_name
  25. fi
  26. exit $exitcode