/tests/runtests.sh

https://code.google.com/ · Shell · 29 lines · 26 code · 2 blank · 1 comment · 1 complexity · 0947413819fe19274ae04dc840e74925 MD5 · raw file

  1. #!/bin/sh
  2. rm -rf test-results trash-directory*
  3. SHELL_PATH="/bin/sh"
  4. uname_s=$(uname -s)
  5. case "${uname_s}" in
  6. AIX) # AIX /bin/sh is not functional with the testsuite
  7. SHELL_PATH=$(which bash)
  8. if [ -z "$SHELL_PATH" ]; then
  9. echo "This is AIX and I can't find bash. HELP!"
  10. fi
  11. GIT_TEST_CMP="cmp"
  12. export GIT_TEST_CMP SHELL_PATH
  13. ;;
  14. esac
  15. code=0
  16. for test in t[0-9]*.sh; do
  17. echo "*** $test ***"
  18. $SHELL_PATH ./$test
  19. if [ $? -ne 0 ]; then
  20. code=1
  21. fi
  22. done
  23. $SHELL_PATH aggregate-results.sh test-results/*
  24. exit $code