check.in 670 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # check : shorthand for make and ctest -R
  3. if [[ $# != 1 || $1 == *help ]]
  4. then
  5. echo "usage: $0 regexp"
  6. echo " Builds and runs tests matching the regexp."
  7. echo " The EIGEN_MAKE_ARGS environment variable allows to pass args to 'make'."
  8. echo " For example, to launch 5 concurrent builds, use EIGEN_MAKE_ARGS='-j5'"
  9. echo " The EIGEN_CTEST_ARGS environment variable allows to pass args to 'ctest'."
  10. echo " For example, with CTest 2.8, you can use EIGEN_CTEST_ARGS='-j5'."
  11. exit 0
  12. fi
  13. if [ -n "${EIGEN_CTEST_ARGS:+x}" ]
  14. then
  15. ./buildtests.sh "$1" && ctest -R "$1" ${EIGEN_CTEST_ARGS}
  16. else
  17. ./buildtests.sh "$1" && ctest -R "$1"
  18. fi
  19. exit $?