mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
improve the scripts for building unit tests:
* support unsupported/ * use egrep instead of grep, properly escape special chars.
This commit is contained in:
@@ -3,10 +3,6 @@ add_custom_target(buildtests)
|
||||
add_custom_target(check COMMAND "ctest")
|
||||
add_dependencies(check buildtests)
|
||||
|
||||
|
||||
include(EigenTesting)
|
||||
ei_init_testing()
|
||||
|
||||
option(EIGEN_SPLIT_LARGE_TESTS "Split large tests into smaller executables" ON)
|
||||
|
||||
find_package(GSL)
|
||||
@@ -169,5 +165,3 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
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(buildtests.in ${CMAKE_BINARY_DIR}/buildtests)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/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="${cmake_tests_list}"
|
||||
targets_to_make=`echo "$TESTSLIST" | grep "$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
|
||||
Reference in New Issue
Block a user