testall 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #! /bin/sh
  2. # Run one or more regression hunts
  3. #
  4. # The file specified as the single argument is a queue of regression
  5. # hunts and/or lists of patches to test. Each entry in the file is
  6. # "hunt" or "test" followed by a bugid for which there is a config
  7. # file and other required files (patch list and test source file).
  8. # Each line of the file is removed as it is processed, and new ones
  9. # can be added while the script is still running.
  10. #set -ex
  11. if [ $# != 1 ]; then
  12. echo "usage: $0 testfile"
  13. exit 1
  14. fi
  15. REGFILE=$1
  16. TMPFILE=testall.tmp
  17. if [ ! -f $REGFILE ]; then
  18. echo "$0: file $REGFILE does not exist"
  19. exit 1
  20. fi
  21. RETURN_FOR_TEST=return
  22. RETURN_FOR_TEST=true
  23. . ../gcc-svn-env
  24. hunt() {
  25. id=$1
  26. echo regression hunt for $id
  27. $RETURN_FOR_TEST
  28. $REG_CLEANUP
  29. reg-hunt $id.config >> $id.log 2>&1
  30. tail -n 1 $id.log
  31. #tail -n 1 $id.log | mutt -s "reghunt for $id finished" janis187
  32. }
  33. testit() {
  34. id=$1
  35. echo testing specific dates for $id
  36. $RETURN_FOR_TEST
  37. $REG_CLEANUP
  38. reg-test $id.config >> $id.log 2>&1
  39. #mutt -s "reg-test for $id finished" janis187 < /dev/null
  40. }
  41. rm -f $REG_STOP
  42. while
  43. read WHICH ID < $REGFILE
  44. do
  45. if [ -f $REG_STOP ]; then
  46. echo "$REG_STOP detected"
  47. rm -f $REG_STOP
  48. exit 1
  49. fi
  50. sed 1d < $REGFILE > $TMPFILE
  51. mv $TMPFILE $REGFILE
  52. case $WHICH in
  53. hunt) hunt $ID;;
  54. test) testit $ID;;
  55. *) echo "unknown action $WHICH, skipping $ID";;
  56. esac
  57. echo
  58. done