2009-11-12 10:25:21 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ $# == 0 -o $# -ge 3 ]
|
|
|
|
then
|
2009-11-16 10:12:15 +08:00
|
|
|
echo "usage: ./buildtests regexp [jobs]"
|
2009-11-26 10:26:37 +08:00
|
|
|
echo " makes tests matching the regexp, with [jobs] concurrent make jobs"
|
2009-11-12 10:25:21 +08:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2009-11-26 10:26:37 +08:00
|
|
|
TESTSLIST="${EIGEN_TESTS_LIST}"
|
|
|
|
|
|
|
|
targets_to_make=`echo "$TESTSLIST" | egrep "$1" | sed s/^/test_/g | xargs echo`
|
2009-11-12 10:25:21 +08:00
|
|
|
|
|
|
|
if [ $# == 1 ]
|
|
|
|
then
|
|
|
|
make $targets_to_make
|
2009-11-16 22:38:44 +08:00
|
|
|
exit $?
|
2009-11-12 10:25:21 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $# == 2 ]
|
|
|
|
then
|
|
|
|
make -j $2 $targets_to_make
|
2009-11-16 22:38:44 +08:00
|
|
|
exit $?
|
2009-11-12 10:25:21 +08:00
|
|
|
fi
|