aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/buildtests.in
blob: aa1a4319f341baf2c438c1b2e21feaa23cbf0444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

if [ $# == 0 -o $# -ge 2 ]
then
  echo "usage: ./buildtests regexp"
  echo "  Makes tests matching the regexp."
  echo "  The EIGEN_JOBS environment variable controls how many"
  echo "  concurrent jobs are launched."
  exit 0
fi

TESTSLIST="@EIGEN_TESTS_LIST@"
targets_to_make=`echo "$TESTSLIST" | egrep "$1" | xargs echo`

if [ -n "${EIGEN_JOBS:+x}" ]
then
  make $targets_to_make -j${EIGEN_JOBS}
else
  make $targets_to_make
fi
exit $?