1 # ============================================================================ 2 # Copyright (c) 2011-2012 University of Pennsylvania 3 # Copyright (c) 2013-2016 Andreas Schuh 6 # See COPYING file for license information or visit 7 # https://cmake-basis.github.io/download.html#license 8 # ============================================================================ 10 ############################################################################## 11 # @file CTestCustom.cmake 12 # @brief Custom testing configuration. 14 # @note The CTestCustom.cmake file is automatically generated by BASIS from 15 # the file CTestCustom.cmake.in which is part of the 18 # The custom CTest variables which can be set in this CTest configuration file 19 # are documented on the 20 # <a href="http://www.vtk.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest"> 21 # Wiki of the VTK project</a>. 23 # @ingroup BasisSettings 24 ############################################################################## 26 # ============================================================================ 27 # disable verification of self-signed CA certificates 28 # ============================================================================ 30 ## @brief cURL options for dashboad submissions. 32 # The following cURL options disable the verification of the CA certificate. 33 # This is required when self-signed certificates are used which cannot be verified. 35 # The drop method is set in the CTest configuration file CTestConfig.cmake. 37 # Note: By default, CTest does not support HTTPS as submission method. 38 # In order to enable it, CTest (and hence CMake) has to be build 39 # manually with the option CMAKE_USE_OPENSSL enabled. 43 "CURLOPT_SSL_VERIFYPEER_OFF" 44 "CURLOPT_SSL_VERIFYHOST_OFF" 48 # ============================================================================ 49 # custom CTest settings 50 # ============================================================================ 52 # ---------------------------------------------------------------------------- 54 # ---------------------------------------------------------------------------- 56 ## @brief Match expressions for warning messages. 58 CTEST_CUSTOM_WARNING_MATCH
59 ${CTEST_CUSTOM_WARNING_MATCH} # keep current warning matches
60 "[0-9][0-9]*: WARNING " # add
match expressions on separate lines
61 "[0-9][0-9]*: Warning " 62 "[0-9][0-9]*: warning " 65 ## @brief Match expressions
for ignored warning messages.
68 ${CTEST_CUSTOM_WARNING_EXCEPTION} # keep current warning exceptions
69 #
"Example-1.0" # add exception expressions on separate lines
72 # specify maximum number of warnings to display 73 #set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "100") 75 # ---------------------------------------------------------------------------- 77 # ---------------------------------------------------------------------------- 79 ## @brief Match expressions for error messages. 81 CTEST_CUSTOM_ERROR_MATCH
82 ${CTEST_CUSTOM_ERROR_MATCH} # keep current error matches
83 "[0-9][0-9]*: ERROR " # add
match expressions on separate lines
86 "No tests were found!!!" # CTest error
if their are no tests
89 ## @brief Match expressions
for ignored error messages.
91 CTEST_CUSTOM_ERROR_EXCEPTION
92 ${CTEST_CUSTOM_ERROR_EXCEPTION} # keep current error exceptions
93 #
"ExampleExec-1.0" # add exception expressions on separate lines
96 # specify maximum number of errors to display 97 #set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "100") 99 # ---------------------------------------------------------------------------- 101 # ---------------------------------------------------------------------------- 103 ## @brief Specify tests which should be ignored during the test stage. 105 CTEST_CUSTOM_TESTS_IGNORE
106 ${CTEST_CUSTOM_TESTS_IGNORE}
110 ## @brief Specify command to
execute before execution of any test during test stage.
112 CTEST_CUSTOM_PRE_TEST
113 ${CTEST_CUSTOM_PRE_TEST}
117 ## @brief Specify command to execute at the end of the test stage. 119 CTEST_CUSTOM_POST_TEST
120 ${CTEST_CUSTOM_POST_TEST}
124 # ----------------------------------------------------------------------------
126 # ----------------------------------------------------------------------------
129 #
get relative paths
for use in globbing expression
131 # Note that all
public include files are copied to the build tree and thus
132 # consider only the once in the build tree, not the once in the source tree.
133 file (RELATIVE_PATH MODULES_DIR
"/Users/as12312/Software/BASIS/Workspace" "/Users/as12312/Software/BASIS/Workspace/modules")
134 file (RELATIVE_PATH CODE_DIR
"/Users/as12312/Software/BASIS/Workspace" "/Users/as12312/Software/BASIS/Workspace/src")
135 file (RELATIVE_PATH INCLUDE_DIR
"/Users/as12312/Software/BASIS/Xcode" "/Users/as12312/Software/BASIS/Xcode/include")
137 ## @brief Exclude certain files from coverage analysis. 139 CTEST_CUSTOM_COVERAGE_EXCLUDE
140 ${CTEST_CUSTOM_COVERAGE_EXCLUDE} # keep current exclude expressions
141 "/CMakeFiles/CMakeTmp/" # exclude try_compile sources
142 "./test/.*" # exclude test implementations
143 "${PROJECT_MODULES_DIR}/.*/test/.*" # exclude test implementations of modules
144 # add further exclude expressions here 145 "/gtest/" # tested by Google
146 "/gmock/" # tested by Google
147 "test.cxx" # tested by Google
148 "test_main.cxx" # tested by Google
149 "/except.h" # only macro definitions
152 ## @brief Specify additional files
which should be considered
for coverage report.
154 # Note that the expressions here are globbing expression as interpreted
155 # by CMake
's file(GLOB) command, not regular expressions. 156 set (CTEST_EXTRA_COVERAGE_GLOB ${CTEST_EXTRA_COVERAGE_GLOB}) 157 foreach (E IN ITEMS .c .cc .cpp .cxx .h .hh .hpp .hxx .txx .inl .inc) 158 list (APPEND CTEST_EXTRA_COVERAGE_GLOB 162 foreach (E IN ITEMS .h .hh .hpp .hxx .txx .inl .inc) 163 list (APPEND CTEST_EXTRA_COVERAGE_GLOB 164 "${INCLUDE_DIR}/*${E}" 167 foreach (M IN LISTS "") 168 foreach (E IN ITEMS .h .hh .hpp .hxx .txx .inl .inc) 169 list (APPEND CTEST_EXTRA_COVERAGE_GLOB 170 "${MODULES_DIR}/${M}/${INCLUDE_DIR}/*${E}" 175 # ---------------------------------------------------------------------------- 177 # ---------------------------------------------------------------------------- 179 ## @brief Specify tests which should be ignored during the memory check stage. 181 CTEST_CUSTOM_MEMCHECK_IGNORE 185 ## @brief Specify command to execute before execution of any test during memory check stage. 187 CTEST_CUSTOM_PRE_MEMCHECK 191 ## @brief Specify command to execute at the end of the memory check stage. 193 CTEST_CUSTOM_POST_MEMCHECK 197 # ---------------------------------------------------------------------------- 199 # ---------------------------------------------------------------------------- 201 ## @brief Adjust output size limit of failed tests in number of characters/bytes. 203 # Note: In order to have CTest ignore these limits and not truncate the test 204 # output, the string "CTEST_FULL_OUTPUT" has to be output by the test 205 # (e.g., as first line of the test output to stdout). 207 # See: http://public.kitware.com/pipermail/cdash/2009-November/000589.html 208 set (CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "1048576") 210 ## @brief Adjust output size limit of failed tests in number of characters/bytes. 212 # Note: In order to have CTest ignore these limits and not truncate the test 213 # output, the string "CTEST_FULL_OUTPUT" has to be output by the test 214 # (e.g., as first line of the test output to stdout). 216 # See: http://public.kitware.com/pipermail/cdash/2009-November/000589.html 217 set (CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "102400") def which(command, path=None, verbose=0, exts=None)
CTEST_CUSTOM_WARNING_EXCEPTION
cURL options for dashboad submissions.
function match(in value, in pattern)
This function implements a more portable way to do pattern matching.
function execute(in options, in cmd, in args)
Execute command as subprocess.