eigen/scripts/buildtests.in
Benoit Jacob 5923bcb1b9 improve the scripts for building unit tests:
* support unsupported/
* use egrep instead of grep, properly escape special chars.
2009-11-25 21:26:37 -05:00

25 lines
413 B
Bash
Executable File

#!/bin/bash
if [ $# == 0 -o $# -ge 3 ]
then
echo "usage: ./buildtests regexp [jobs]"
echo " makes tests matching the regexp, with [jobs] concurrent make jobs"
exit 0
fi
TESTSLIST="${EIGEN_TESTS_LIST}"
targets_to_make=`echo "$TESTSLIST" | egrep "$1" | sed s/^/test_/g | xargs echo`
if [ $# == 1 ]
then
make $targets_to_make
exit $?
fi
if [ $# == 2 ]
then
make -j $2 $targets_to_make
exit $?
fi