test.sh 474 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. FAILURES=0
  3. mkdir -p test_out
  4. echo "Running Regression Tests..."
  5. for mrt in `ls test_data`; do
  6. /bin/echo -n " testing $mrt..."
  7. OUT=$mrt.bgp.gz
  8. ./bgpdump -vm test_data/$mrt > test_out/$OUT
  9. gzip -cd test_expect/$OUT | diff -q test_out/$OUT -
  10. if [ $? = 0 ]; then
  11. echo "success"
  12. else
  13. FAILURES=$(( $FAILURES + 1 ))
  14. fi
  15. done
  16. if [ $FAILURES != 0 ]; then
  17. echo !!! $FAILURES failures !!!
  18. exit 1
  19. else
  20. exit 0
  21. fi