run_all_tests.sh 664 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. # This scripts runs all tests available in the temporal module directory
  3. # Logs a written to "run.log"
  4. if [ -z "$GISBASE" ] ; then
  5. echo "You must be in GRASS GIS to run this program." 1>&2
  6. exit 1
  7. fi
  8. LOG_FILE="/tmp/run.log"
  9. echo "Logfile\n\n" > $LOG_FILE
  10. export GRASS_MESSAGE_FORMAT=plain
  11. # For each directory
  12. for mydir in `ls -d t*` ; do
  13. if [ -d "${mydir}" ] ; then
  14. echo "${mydir}"
  15. cd "${mydir}"
  16. for myfile in `ls test.* | grep -v '~'` ; do
  17. echo "####### TEST ####### ${myfile}" >> "${LOG_FILE}" 2>&1
  18. sh "${myfile}" >> "${LOG_FILE}" 2>&1
  19. done
  20. cd ..
  21. fi
  22. done
  23. mv "${LOG_FILE}" .