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`
This commit is contained in:
Benoit Jacob 2009-11-12 09:35:10 -05:00
parent bc18ba7e49
commit fc492b6264
3 changed files with 15 additions and 1 deletions

View File

@ -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)

View File

@ -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`

14
test/mctestr.in Executable file
View File

@ -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