runtests 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/bash
  2. ORIG=`mktemp /tmp/mytest.XXXXXX`
  3. NEW=`mktemp /tmp/mytest.XXXXXX`
  4. do_filter() {
  5. sed 's/line:[0-9]*//; /^Executed.*/d; s/column=[0-9]*/ /; s/Cols: [0-9]*-[0-9]*/___/'
  6. }
  7. for i in ael-test*; do
  8. echo -n Test: $i..................
  9. (cd $i; ../../../../utils/aelparse -n -d | grep -v -i 'seconds' > ../res.$i)
  10. do_filter < res.$i > $NEW
  11. do_filter < ref.$i > $ORIG
  12. if (diff -q $NEW $ORIG > /dev/null 2>&1 ) then
  13. echo PASSED
  14. rm res.$i
  15. else
  16. echo %%%%%%FAILED%%%%%%
  17. # diff -u ref.$i res.$i
  18. diff -u $ORIG $NEW
  19. fi
  20. done
  21. for i in ael-ntest*; do
  22. echo -n Test: $i.................
  23. (cd $i; ../../../../utils/aelparse -d | grep -v -i 'seconds' > ../res.$i)
  24. do_filter < res.$i > $NEW
  25. do_filter < ref.$i > $ORIG
  26. if (diff -q $NEW $ORIG > /dev/null 2>&1 ) then
  27. echo PASSED
  28. rm res.$i
  29. else
  30. echo %%%%%%FAILED%%%%%%
  31. # diff -u ref.$i res.$i
  32. diff -u $ORIG $NEW
  33. fi
  34. done
  35. for i in ael-vtest*; do
  36. echo -n Test: $i.................
  37. (cd $i; ../../../../utils/aelparse -d -w -n | grep -v -i 'seconds' > ../res2.$i)
  38. if (diff -q ref.$i $i/extensions.conf.aeldump > /dev/null 2>&1 ) then
  39. echo PASSED
  40. rm res2.$i
  41. rm $i/extensions.conf.aeldump
  42. else
  43. echo %%%%%%FAILED%%%%%%
  44. # diff -u ref.$i res.$i
  45. diff -u ref.$i $i/extensions.conf.aeldump
  46. fi
  47. done
  48. rm $NEW $ORIG