From 4d2c10e0dae0fc1fc76ecfe69a3a6e420dd12764 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 22 Aug 2013 23:42:57 +0000 Subject: [PATCH] Introduce DEAL_II_PICKUP_REGEX git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30442 0785d39b-7218-0410-832d-ea1e28bc413d --- .../macros/macro_deal_ii_pickup_tests.cmake | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake b/deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake index e3b907ee95..a998030039 100644 --- a/deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake +++ b/deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake @@ -17,6 +17,9 @@ # # A Macro to pick up all tests in a test subdirectory # +# If DEAL_II_PICKUP_REGEX is set, only tests matching the regex will be +# processed. +# # Usage: # DEAL_II_PICKUP_TESTS() # @@ -28,17 +31,22 @@ MACRO(DEAL_II_PICKUP_TESTS) FOREACH(_test ${_tests}) - GET_FILENAME_COMPONENT(_test ${_test} NAME_WE) + IF( "${DEAL_II_PICKUP_REGEX}" STREQUAL "" OR + _test MATCHES "${DEAL_II_PICKUP_REGEX}" ) + GET_FILENAME_COMPONENT(_test ${_test} NAME_WE) + + IF(_test MATCHES debug) + SET(_configuration DEBUG) + ELSEIF(_test MATCHES release) + SET(_configuration RELEASE) + ELSE() + SET(_configuration) + ENDIF() - IF(_test MATCHES debug) - SET(_configuration DEBUG) - ELSEIF(_test MATCHES release) - SET(_configuration RELEASE) - ELSE() - SET(_configuration) + STRING(REGEX REPLACE "\\..*" "." _test ${_test}) + DEAL_II_ADD_TEST(${_category} ${_test} ${_configuration}) ENDIF() - STRING(REGEX REPLACE "\\..*" "." _test ${_test}) - DEAL_II_ADD_TEST(${_category} ${_test} ${_configuration}) ENDFOREACH() + ENDMACRO() -- 2.39.5