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