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-12 10:25:21 +08:00
|
|
|
echo " makes tests matching the regexp, with <jobs> concurrent make jobs"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
TESTSLIST="${cmake_tests_list}"
|
2009-11-13 04:37:50 +08:00
|
|
|
targets_to_make=`echo "$TESTSLIST" | grep "$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
|