diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-11-12 09:35:10 -0500 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-11-12 09:35:10 -0500 |
commit | fc492b6264249e8ec5b7234d8d53047c49fcb710 (patch) | |
tree | b1dc7bdf78dfae2f17e14a8f42d97d44cd621975 | |
parent | bc18ba7e49d9871e9318dbccc54d0d5ea8825920 (diff) |
add mctestr script. In your build directory, just do:
./mctestr ^qr 5
and it will build all tests matching ^qr with 5 jobs and then do `ctest -R ^qr`
-rw-r--r-- | test/CMakeLists.txt | 1 | ||||
-rwxr-xr-x | test/maketests.in | 1 | ||||
-rwxr-xr-x | test/mctestr.in | 14 |
3 files changed, 15 insertions, 1 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5cea1a582..aad1572f7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -164,3 +164,4 @@ ei_add_property(EIGEN_TESTING_SUMMARY "CXX_FLAGS: ${CMAKE_CXX_FLAGS}\n") ei_add_property(EIGEN_TESTING_SUMMARY "Sparse lib flags: ${SPARSE_LIBS}\n") configure_file(maketests.in ${CMAKE_BINARY_DIR}/maketests) +configure_file(mctestr.in ${CMAKE_BINARY_DIR}/mctestr) diff --git a/test/maketests.in b/test/maketests.in index cb288ae7d..f9cafed26 100755 --- a/test/maketests.in +++ b/test/maketests.in @@ -7,7 +7,6 @@ then exit 0 fi -SRCDIR=${CMAKE_CURRENT_SOURCE_DIR} TESTSLIST="${cmake_tests_list}" targets_to_make=`echo "$TESTSLIST" | grep "$1" | sed s/^/test_/g | xargs` diff --git a/test/mctestr.in b/test/mctestr.in new file mode 100755 index 000000000..a388ef38f --- /dev/null +++ b/test/mctestr.in @@ -0,0 +1,14 @@ +#!/bin/bash +# mctestr : shorthand for make and ctest -R + +if [ $# == 0 -o $# -ge 3 ] +then + echo "usage: ./mctestr regexp [jobs]" + echo " makes and runs tests matching the regexp, with <jobs> concurrent make jobs" + exit 0 +fi + +./maketests $* + +# TODO when ctest 2.8 comes out, honor the jobs parameter +ctest -R $1
\ No newline at end of file |