Go to the documentation of this file.00001 ##############################################################################
00002 # @file CTestCustom.cmake
00003 # @brief Custom testing configuration.
00004 #
00005 # @note The CTestCustom.cmake file is automatically generated by BASIS from
00006 # the file CTestCustom.cmake.in which is part of this source package.
00007 #
00008 # The custom CTest variables which can be set in this CTest configuration file
00009 # are documented on the
00010 # <a href="http://www.vtk.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest">
00011 # Wiki of the VTK project</a>.
00012 #
00013 # Copyright (c) 2011, 2012 University of Pennsylvania. All rights reserved.<br />
00014 # See https://www.cbica.upenn.edu/sbia/software/license.html or COPYING file.
00015 #
00016 # Contact: SBIA Group <sbia-software at uphs.upenn.edu>
00017 #
00018 # @ingroup BasisSettings
00019 ##############################################################################
00020
00021 # ============================================================================
00022 # disable verification of self-signed CA certificates
00023 # ============================================================================
00024
00025 ## @brief cURL options for dashboad submissions.
00026 #
00027 # The following cURL options disable the verification of the CA certificate.
00028 # This is required when self-signed certificates are used which cannot be verified.
00029 #
00030 # The drop method is set in the CTest configuration file CTestConfig.cmake.
00031 #
00032 # Note: By default, CTest does not support HTTPS as submission method.
00033 # In order to enable it, CTest (and hence CMake) has to be build
00034 # manually with the option CMAKE_USE_OPENSSL enabled.
00035 if (CTEST_DROP_METHOD STREQUAL "https")
00036 set (
00037 CTEST_CURL_OPTIONS
00038 "CURLOPT_SSL_VERIFYPEER_OFF"
00039 "CURLOPT_SSL_VERIFYHOST_OFF"
00040 )
00041 endif ()
00042
00043 # ============================================================================
00044 # custom CTest settings
00045 # ============================================================================
00046
00047 # ----------------------------------------------------------------------------
00048 # warnings
00049 # ----------------------------------------------------------------------------
00050
00051 ## @brief Match expressions for warning messages.
00052 set (
00053 CTEST_CUSTOM_WARNING_MATCH
00054 ${CTEST_CUSTOM_WARNING_MATCH} # keep current warning matches
00055 "[0-9][0-9]*: WARNING " # add match expressions on separate lines
00056 "[0-9][0-9]*: Warning "
00057 "[0-9][0-9]*: warning "
00058 )
00059
00060 ## @brief Match expressions for ignored warning messages.
00061 set (
00062 CTEST_CUSTOM_WARNING_EXCEPTION
00063 ${CTEST_CUSTOM_WARNING_EXCEPTION} # keep current warning exceptions
00064 # "Example-1.0" # add exception expressions on separate lines
00065 )
00066
00067 # specify maximum number of warnings to display
00068 #set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "100")
00069
00070 # ----------------------------------------------------------------------------
00071 # errors
00072 # ----------------------------------------------------------------------------
00073
00074 ## @brief Match expressions for error messages.
00075 set (
00076 CTEST_CUSTOM_ERROR_MATCH
00077 ${CTEST_CUSTOM_ERROR_MATCH} # keep current error matches
00078 "[0-9][0-9]*: ERROR " # add match expressions on separate lines
00079 "[0-9][0-9]*: Error "
00080 "[0-9][0-9]*: error "
00081 "No tests were found!!!" # CTest error if their are no tests
00082 )
00083
00084 ## @brief Match expressions for ignored error messages.
00085 set (
00086 CTEST_CUSTOM_ERROR_EXCEPTION
00087 ${CTEST_CUSTOM_ERROR_EXCEPTION} # keep current error exceptions
00088 # "ExampleExec-1.0" # add exception expressions on separate lines
00089 )
00090
00091 # specify maximum number of errors to display
00092 #set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "100")
00093
00094 # ----------------------------------------------------------------------------
00095 # test
00096 # ----------------------------------------------------------------------------
00097
00098 ## @brief Specify tests which should be ignored during the test stage.
00099 set (
00100 CTEST_CUSTOM_TESTS_IGNORE
00101 ${CTEST_CUSTOM_TESTS_IGNORE}
00102 ""
00103 )
00104
00105 ## @brief Specify command to execute before execution of any test during test stage.
00106 set (
00107 CTEST_CUSTOM_PRE_TEST
00108 ${CTEST_CUSTOM_PRE_TEST}
00109 ""
00110 )
00111
00112 ## @brief Specify command to execute at the end of the test stage.
00113 set (
00114 CTEST_CUSTOM_POST_TEST
00115 ${CTEST_CUSTOM_POST_TEST}
00116 ""
00117 )
00118
00119 # ----------------------------------------------------------------------------
00120 # coverage
00121 # ----------------------------------------------------------------------------
00122
00123
00124 # get relative paths for use in globbing expression
00125 #
00126 # Note that all public include files are copied to the build tree and thus
00127 # consider only the once in the build tree, not the once in the source tree.
00128 file (RELATIVE_PATH MODULES_DIR "/sbia/home/schuha/projects/basis-1.2.3" "/sbia/home/schuha/projects/basis-1.2.3/modules")
00129 file (RELATIVE_PATH CODE_DIR "/sbia/home/schuha/projects/basis-1.2.3" "/sbia/home/schuha/projects/basis-1.2.3/src")
00130 file (RELATIVE_PATH INCLUDE_DIR "/sbia/home/schuha/sandbox/build/basis-1.2.3" "/sbia/home/schuha/sandbox/build/basis-1.2.3/include")
00131
00132 ## @brief Exclude certain files from coverage analysis.
00133 set (
00134 CTEST_CUSTOM_COVERAGE_EXCLUDE
00135 ${CTEST_CUSTOM_COVERAGE_EXCLUDE} # keep current exclude expressions
00136 "/CMakeFiles/CMakeTmp/" # exclude try_compile sources
00137 "./test/.*" # exclude test implementations
00138 "./modules/.*/test/.*" # exclude test implementations of modules
00139 # add further exclude expressions here
00140 "/gtest/" # tested by Google
00141 "/gmock/" # tested by Google
00142 "test.cxx" # tested by Google
00143 "test_main.cxx" # tested by Google
00144 "/except.h" # only macro definitions
00145 )
00146
00147 ## @brief Specify additional files which should be considered for coverage report.
00148 #
00149 # Note that the expressions here are globbing expression as interpreted
00150 # by CMake's file(GLOB) command, not regular expressions.
00151 set (CTEST_EXTRA_COVERAGE_GLOB ${CTEST_EXTRA_COVERAGE_GLOB})
00152 foreach (E IN ITEMS .c .cc .cpp .cxx .h .hh .hpp .hxx .txx .inl .inc)
00153 list (APPEND CTEST_EXTRA_COVERAGE_GLOB
00154 "${CODE_DIR}/*${E}"
00155 )
00156 endforeach ()
00157 set (BASIS_AUTO_PREFIX_INCLUDES "FALSE")
00158 if (BASIS_AUTO_PREFIX_INCLUDES)
00159 # TODO Files in build tree are yet never considered by CTest
00160 # as long as they are uncovered. This is due to a
00161 # bug in CTest itself.
00162 #
00163 # See http://public.kitware.com/Bug/view.php?id=12910.
00164 else ()
00165 foreach (E IN ITEMS .h .hh .hpp .hxx .txx .inl .inc)
00166 list (APPEND CTEST_EXTRA_COVERAGE_GLOB
00167 "${INCLUDE_DIR}/*${E}"
00168 )
00169 endforeach ()
00170 endif ()
00171 foreach (M IN LISTS "")
00172 if (NOT BASIS_AUTO_PREFIX_INCLUDES)
00173 foreach (E IN ITEMS .h .hh .hpp .hxx .txx .inl .inc)
00174 list (APPEND CTEST_EXTRA_COVERAGE_GLOB
00175 "${MODULES_DIR}/${M}/${INCLUDE_DIR}/*${E}"
00176 )
00177 endforeach ()
00178 endif ()
00179 foreach (E IN ITEMS .c .cc .cpp .cxx .h .hh .hpp .hxx .txx .inl .inc)
00180 list (APPEND CTEST_EXTRA_COVERAGE_GLOB
00181 "${MODULES_DIR}/${M}/${CODE_DIR}/*${E}"
00182 )
00183 endforeach ()
00184 endforeach ()
00185
00186 # ----------------------------------------------------------------------------
00187 # memory check
00188 # ----------------------------------------------------------------------------
00189
00190 ## @brief Specify tests which should be ignored during the memory check stage.
00191 set (
00192 CTEST_CUSTOM_MEMCHECK_IGNORE
00193 ""
00194 )
00195
00196 ## @brief Specify command to execute before execution of any test during memory check stage.
00197 set (
00198 CTEST_CUSTOM_PRE_MEMCHECK
00199 ""
00200 )
00201
00202 ## @brief Specify command to execute at the end of the memory check stage.
00203 set (
00204 CTEST_CUSTOM_POST_MEMCHECK
00205 ""
00206 )
00207
00208 # ----------------------------------------------------------------------------
00209 # output
00210 # ----------------------------------------------------------------------------
00211
00212 ## @brief Adjust output size limit of failed tests in number of characters/bytes.
00213 #
00214 # Note: In order to have CTest ignore these limits and not truncate the test
00215 # output, the string "CTEST_FULL_OUTPUT" has to be output by the test
00216 # (e.g., as first line of the test output to stdout).
00217 #
00218 # See: http://public.kitware.com/pipermail/cdash/2009-November/000589.html
00219 set (CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "1048576")
00220
00221 ## @brief Adjust output size limit of failed tests in number of characters/bytes.
00222 #
00223 # Note: In order to have CTest ignore these limits and not truncate the test
00224 # output, the string "CTEST_FULL_OUTPUT" has to be output by the test
00225 # (e.g., as first line of the test output to stdout).
00226 #
00227 # See: http://public.kitware.com/pipermail/cdash/2009-November/000589.html
00228 set (CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "102400")