# Only run tests if the build was successful:
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
- --build ${CTEST_BINARY_DIRECTORY} --target setup_test
+ --build ${CTEST_BINARY_DIRECTORY} --target setup_tests
OUTPUT_QUIET RESULT_VARIABLE _res
)
IF(NOT "${_res}" STREQUAL "0")
MESSAGE(FATAL_ERROR "
-\"setup_test\" target exited with an error. Bailing out.
+\"setup_tests\" target exited with an error. Bailing out.
"
)
ENDIF()
#
# test - runs a minimal set of tests
#
-# setup_test - sets up the testsuite subprojects
-# clean_test - runs the 'clean' target in every testsuite subproject
-# prune_test - removes all testsuite subprojects
+# setup_tests - sets up the testsuite subprojects
+# clean_tests - runs the 'clean' target in every testsuite subproject
+# prune_tests - removes all testsuite subprojects
#
###\")"
)
$ cd build
$ cmake ../deal.II
$ make -j16
- $ make -j16 setup_test
+ $ make -j16 setup_tests
$ ctest -j16
</pre>
The exact meaning of all of these commands will be explained in much
<p>
To enable the testsuite, configure and build deal.II in a build
directory as normal (installation is not necessary). After that you
- can setup the testsuite via the "setup_test" target:
+ can setup the testsuite via the "setup_tests" target:s
<pre>
- $ make setup_test
+ $ make setup_tests
</pre>
This will set up all tests supported by the current configuration.
The testsuite can now be run in the current <i>build directory</i> as
Setup can be fine-tuned using the following commands:
<pre>
- $ make clean_test - runs the 'clean' target in every testsuite subproject
+ $ make clean_tests - runs the 'clean' target in every testsuite subproject
- $ make prune_test - removes all testsuite subprojects
+ $ make prune_tests - removes all testsuite subprojects
</pre>
<p>
In addition, when setting up the testsuite, the following environment
variables can be used to override default behavior when
- calling <code>make setup_test</code>:
+ calling <code>make setup_tests</code>:
<pre>
TEST_PICKUP_REGEX
<p>
<b>Note:</b> Specifying these options via environment variables is
- volatile, i.e. if <code>make setup_test</code> is invoked a second
+ volatile, i.e. if <code>make setup_tests</code> is invoked a second
time without the variables set in environment, the option will be
reset to the default value. If you want to set these options
permanently, set them via cmake as CMake variable in the build
tolerances. To use it, simply export where the <code>numdiff</code>
executable can be found via the <code>PATH</code>
environment variable so that it can be found during
- <code>make setup_test</code>.
+ <code>make setup_tests</code>.
</p>
<a name="runoutput"></a>
Now, rerun
<pre>
- $ make setup_test
+ $ make setup_tests
</pre>
so that your new test is picked up. After that it is possible to
invoke it with
#
# Setup tests:
-ADD_CUSTOM_TARGET(setup_test)
+ADD_CUSTOM_TARGET(setup_tests)
# Clean all tests
-ADD_CUSTOM_TARGET(clean_test)
+ADD_CUSTOM_TARGET(clean_tests)
# Remove all tests:
-ADD_CUSTOM_TARGET(prune_test)
+ADD_CUSTOM_TARGET(prune_tests)
#
# Write a minimalistic CTestTestfile.cmake file to CMAKE_BINARY_DIR and
IF(NOT "${_category_dir}" STREQUAL "")
- ADD_CUSTOM_TARGET(setup_test_${_category}
+ ADD_CUSTOM_TARGET(setup_tests_${_category}
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_CURRENT_BINARY_DIR}/${_category}
COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/${_category} &&
DEPENDS ${_category_dir}
COMMENT "Processing tests/${_category}"
)
- ADD_DEPENDENCIES(setup_test setup_test_${_category})
+ ADD_DEPENDENCIES(setup_tests setup_tests_${_category})
# depend on a valid build directory (libraries built, config in place):
- ADD_DEPENDENCIES(setup_test_${_category} setup_build_dir)
+ ADD_DEPENDENCIES(setup_tests_${_category} setup_build_dir)
- ADD_CUSTOM_TARGET(clean_test_${_category}
+ ADD_CUSTOM_TARGET(clean_tests_${_category}
COMMAND [ ! -d ${_category} ] || ${CMAKE_COMMAND}
--build ${CMAKE_CURRENT_BINARY_DIR}/${_category} --target clean
)
- ADD_DEPENDENCIES(clean_test clean_test_${_category})
+ ADD_DEPENDENCIES(clean_tests clean_tests_${_category})
- ADD_CUSTOM_TARGET(prune_test_${_category}
+ ADD_CUSTOM_TARGET(prune_tests_${_category}
COMMAND ${CMAKE_COMMAND} -E remove_directory
${CMAKE_CURRENT_BINARY_DIR}/${_category}
)
- ADD_DEPENDENCIES(prune_test prune_test_${_category})
+ ADD_DEPENDENCIES(prune_tests prune_tests_${_category})
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfile.cmake
"SUBDIRS(${_category})\n"