aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-12-30 15:07:05 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-12-30 15:07:05 -0500
commit2038f9cc8d03b02e2eb4173a3e4726f3318e74be (patch)
tree41aab32340a41688ca01ea17fb3d22e1de799c28 /scripts
parent233540e58af2b2ae8129174a957a68d1eea71bf2 (diff)
* The 'check' and 'buildtests' scripts no longer take a jobs parameter.
Instead, they honor the EIGEN_JOBS environment variable if defined. * The syntax ${BLABLA} in bash scripts was conflicting with CMake configured file syntax. Resolved by using the @ONLY option and the @BLABLA@ syntax.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/CMakeLists.txt8
-rwxr-xr-xscripts/buildtests.in22
-rwxr-xr-xscripts/check.in12
3 files changed, 21 insertions, 21 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index acf3bb6e9..7e2c9ca7a 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -1,6 +1,6 @@
get_property(EIGEN_TESTS_LIST GLOBAL PROPERTY EIGEN_TESTS_LIST)
-configure_file(buildtests.in ${CMAKE_BINARY_DIR}/buildtests)
+configure_file(buildtests.in ${CMAKE_BINARY_DIR}/buildtests @ONLY)
-configure_file(check.in ${CMAKE_BINARY_DIR}/check)
-configure_file(debug.in ${CMAKE_BINARY_DIR}/debug)
-configure_file(release.in ${CMAKE_BINARY_DIR}/release)
+configure_file(check.in ${CMAKE_BINARY_DIR}/check COPYONLY)
+configure_file(debug.in ${CMAKE_BINARY_DIR}/debug COPYONLY)
+configure_file(release.in ${CMAKE_BINARY_DIR}/release COPYONLY)
diff --git a/scripts/buildtests.in b/scripts/buildtests.in
index 3c4282848..aa1a4319f 100755
--- a/scripts/buildtests.in
+++ b/scripts/buildtests.in
@@ -1,24 +1,22 @@
#!/bin/bash
-if [ $# == 0 -o $# -ge 3 ]
+if [ $# == 0 -o $# -ge 2 ]
then
- echo "usage: ./buildtests regexp [jobs]"
- echo " makes tests matching the regexp, with [jobs] concurrent make jobs"
+ 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}"
-
+TESTSLIST="@EIGEN_TESTS_LIST@"
targets_to_make=`echo "$TESTSLIST" | egrep "$1" | xargs echo`
-if [ $# == 1 ]
+if [ -n "${EIGEN_JOBS:+x}" ]
then
+ make $targets_to_make -j${EIGEN_JOBS}
+else
make $targets_to_make
- exit $?
fi
+exit $?
-if [ $# == 2 ]
-then
- make -j $2 $targets_to_make
- exit $?
-fi
diff --git a/scripts/check.in b/scripts/check.in
index 82d805b79..e1fdccd0a 100755
--- a/scripts/check.in
+++ b/scripts/check.in
@@ -1,12 +1,14 @@
#!/bin/bash
# check : shorthand for make and ctest -R
-if [ $# == 0 -o $# -ge 3 ]
+if [ $# == 0 -o $# -ge 2 ]
then
- echo "usage: ./check regexp [jobs]"
- echo " makes and runs tests matching the regexp, with [jobs] concurrent make jobs"
+ echo "usage: ./check regexp"
+ echo " Makes and runs tests matching the regexp."
+ echo " The EIGEN_JOBS environment variable controls how many"
+ echo " concurrent jobs are launched."
exit 0
fi
-# TODO when ctest 2.8 comes out, honor the jobs parameter
-./buildtests "$1" "${2:-1}" && ctest -R "$1"
+# TODO ctest 2.8 is out, honor the jobs parameter
+./buildtests "$1" && ctest -R "$1"