run_all_tests.sh 629 B

1234567891011121314151617181920212223242526
  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. # For each directory
  11. for mydir in `ls -d t*` ; do
  12. if [ -d "${mydir}" ] ; then
  13. echo "${mydir}"
  14. cd "${mydir}"
  15. for myfile in `ls test.* | grep -v '~'` ; do
  16. echo "####### TEST ####### ${myfile}" >> "${LOG_FILE}" 2>&1
  17. sh "${myfile}" >> "${LOG_FILE}" 2>&1
  18. done
  19. cd ..
  20. fi
  21. done
  22. mv "${LOG_FILE}" .