From 5923bcb1b94cd5a79dfc57f2ffe6271d999ea67d Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Wed, 25 Nov 2009 21:26:37 -0500 Subject: improve the scripts for building unit tests: * support unsupported/ * use egrep instead of grep, properly escape special chars. --- scripts/buildtests.in | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 scripts/buildtests.in (limited to 'scripts/buildtests.in') diff --git a/scripts/buildtests.in b/scripts/buildtests.in new file mode 100755 index 000000000..1cc8e956f --- /dev/null +++ b/scripts/buildtests.in @@ -0,0 +1,24 @@ +#!/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 -- cgit v1.2.3