From: Matthias Maier Date: Tue, 17 Sep 2013 08:47:50 +0000 (+0000) Subject: Reorganize the test setups slightly X-Git-Tag: v8.1.0~570^2~312 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1da638cd0fd73c6ff2e70d28cb8899c6e9c68ec9;p=dealii.git Reorganize the test setups slightly quick checks are now independent of the testsuite and cannot be run any more from the top binary directory; instead a target "test" must be used. git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30757 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt index 5a6f6f4c2c..248570cfcc 100644 --- a/deal.II/CMakeLists.txt +++ b/deal.II/CMakeLists.txt @@ -80,8 +80,6 @@ PROJECT(deal.II CXX) ENABLE_LANGUAGE_OPTIONAL(C) ENABLE_LANGUAGE_OPTIONAL(Fortran) -ENABLE_TESTING() - INCLUDE(setup_post_project_call) INCLUDE(setup_deal_ii) diff --git a/deal.II/tests/CMakeLists.txt b/deal.II/tests/CMakeLists.txt index 7771e72e44..ad14ac2493 100644 --- a/deal.II/tests/CMakeLists.txt +++ b/deal.II/tests/CMakeLists.txt @@ -18,6 +18,8 @@ # A minimalistic set of tests: # +ENABLE_TESTING() + FOREACH(_build ${DEAL_II_BUILD_TYPES}) STRING(TOLOWER ${_build} _build_lowercase) @@ -77,3 +79,15 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES}) SET_TESTS_PROPERTIES(${_target} PROPERTIES LABEL "sanity checks") ENDFOREACH() + +# +# A custom test target: +# +# @TIMO: TODO, write a little script to be run after ctest that queries for +# (affinity|project|etc).(debug|release)-OK and outputs an appropriate +# message. +# +ADD_CUSTOM_TARGET(test + COMMAND ${CMAKE_CTEST_COMMAND} --force-new-ctest-process + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 326911ffce..b98d8db633 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -24,6 +24,14 @@ # MESSAGE(STATUS "Proceed to test definitions now.") +ENABLE_TESTING() + +# +# Write a minimalistic CTestTestfile.cmake file to CMAKE_BINARY_DIR: +# +FILE(WRITE ${CMAKE_BINARY_DIR}/CTestTestfile.cmake + "SUBDIRS(tests)" + ) # # Two custom targets to setup and cleanup the testsuite: