2009-11-12 10:25:21 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2010-01-01 05:13:56 +08:00
|
|
|
if [[ $# != 1 || $1 == *help ]]
|
2009-11-12 10:25:21 +08:00
|
|
|
then
|
2010-01-01 05:13:56 +08:00
|
|
|
echo "usage: ./check regexp"
|
|
|
|
echo " Builds tests matching the regexp."
|
|
|
|
echo " The EIGEN_MAKE_ARGS environment variable allows to pass args to 'make'."
|
|
|
|
echo " For example, to launch 5 concurrent builds, use EIGEN_MAKE_ARGS='-j5'"
|
2009-11-12 10:25:21 +08:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2009-12-31 04:07:05 +08:00
|
|
|
TESTSLIST="@EIGEN_TESTS_LIST@"
|
2009-12-03 01:07:47 +08:00
|
|
|
targets_to_make=`echo "$TESTSLIST" | egrep "$1" | xargs echo`
|
2009-11-12 10:25:21 +08:00
|
|
|
|
2010-01-01 05:13:56 +08:00
|
|
|
if [ -n "${EIGEN_MAKE_ARGS:+x}" ]
|
2009-11-12 10:25:21 +08:00
|
|
|
then
|
2010-01-01 05:13:56 +08:00
|
|
|
make $targets_to_make ${EIGEN_MAKE_ARGS}
|
2009-12-31 04:07:05 +08:00
|
|
|
else
|
2009-11-12 10:25:21 +08:00
|
|
|
make $targets_to_make
|
|
|
|
fi
|
2009-12-31 04:07:05 +08:00
|
|
|
exit $?
|
2009-11-12 10:25:21 +08:00
|
|
|
|