CTestCustom.cmake
Go to the documentation of this file.
1 # ============================================================================
2 # Copyright (c) 2015 <provider-name>
3 # All rights reserved.
4 #
5 # See COPYING file for license information.
6 # ============================================================================
7 
8 ##############################################################################
9 # @file CTestCustom.cmake
10 # @brief Custom testing configuration.
11 #
12 # @note The CTestCustom.cmake file is automatically generated by BASIS from
13 # the file CTestCustom.cmake.in which is part of the
14 # grl package.
15 #
16 # The custom CTest variables which can be set in this CTest configuration file
17 # are documented on the
18 # <a href="http://www.vtk.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest">
19 # Wiki of the VTK project</a>.
20 #
21 # @ingroup BasisSettings
22 ##############################################################################
23 
24 # ============================================================================
25 # disable verification of self-signed CA certificates
26 # ============================================================================
27 
28 ## @brief cURL options for dashboad submissions.
29 #
30 # The following cURL options disable the verification of the CA certificate.
31 # This is required when self-signed certificates are used which cannot be verified.
32 #
33 # The drop method is set in the CTest configuration file CTestConfig.cmake.
34 #
35 # Note: By default, CTest does not support HTTPS as submission method.
36 # In order to enable it, CTest (and hence CMake) has to be build
37 # manually with the option CMAKE_USE_OPENSSL enabled.
38 if (CTEST_DROP_METHOD STREQUAL "https")
39  set (
40  CTEST_CURL_OPTIONS
41  "CURLOPT_SSL_VERIFYPEER_OFF"
42  "CURLOPT_SSL_VERIFYHOST_OFF"
43  )
44 endif ()
45 
46 # ============================================================================
47 # custom CTest settings
48 # ============================================================================
49 
50 # ----------------------------------------------------------------------------
51 # warnings
52 # ----------------------------------------------------------------------------
53 
54 ## @brief Match expressions for warning messages.
55 set (
56  CTEST_CUSTOM_WARNING_MATCH
57  ${CTEST_CUSTOM_WARNING_MATCH} # keep current warning matches
58  "[0-9][0-9]*: WARNING " # add match expressions on separate lines
59  "[0-9][0-9]*: Warning "
60  "[0-9][0-9]*: warning "
61 )
62 
63 ## @brief Match expressions for ignored warning messages.
64 set (
65  CTEST_CUSTOM_WARNING_EXCEPTION
66  ${CTEST_CUSTOM_WARNING_EXCEPTION} # keep current warning exceptions
67 # "Example-1.0" # add exception expressions on separate lines
68 )
69 
70 # specify maximum number of warnings to display
71 #set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "100")
72 
73 # ----------------------------------------------------------------------------
74 # errors
75 # ----------------------------------------------------------------------------
76 
77 ## @brief Match expressions for error messages.
78 set (
79  CTEST_CUSTOM_ERROR_MATCH
80  ${CTEST_CUSTOM_ERROR_MATCH} # keep current error matches
81  "[0-9][0-9]*: ERROR " # add match expressions on separate lines
82  "[0-9][0-9]*: Error "
83  "[0-9][0-9]*: error "
84  "No tests were found!!!" # CTest error if their are no tests
85 )
86 
87 ## @brief Match expressions for ignored error messages.
88 set (
89  CTEST_CUSTOM_ERROR_EXCEPTION
90  ${CTEST_CUSTOM_ERROR_EXCEPTION} # keep current error exceptions
91 # "ExampleExec-1.0" # add exception expressions on separate lines
92 )
93 
94 # specify maximum number of errors to display
95 #set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "100")
96 
97 # ----------------------------------------------------------------------------
98 # test
99 # ----------------------------------------------------------------------------
100 
101 ## @brief Specify tests which should be ignored during the test stage.
102 set (
103  CTEST_CUSTOM_TESTS_IGNORE
104  ${CTEST_CUSTOM_TESTS_IGNORE}
105  ""
106 )
107 
108 ## @brief Specify command to execute before execution of any test during test stage.
109 set (
110  CTEST_CUSTOM_PRE_TEST
111  ${CTEST_CUSTOM_PRE_TEST}
112  ""
113 )
114 
115 ## @brief Specify command to execute at the end of the test stage.
116 set (
117  CTEST_CUSTOM_POST_TEST
118  ${CTEST_CUSTOM_POST_TEST}
119  ""
120 )
121 
122 # ----------------------------------------------------------------------------
123 # coverage
124 # ----------------------------------------------------------------------------
125 
126 # get relative paths for use in globbing expression
127 file (RELATIVE_PATH MODULES_DIR "/Users/athundt/source/grl" "/Users/athundt/source/grl/modules")
128 file (RELATIVE_PATH CODE_DIR "/Users/athundt/source/grl" "/Users/athundt/source/grl/src")
129 file (RELATIVE_PATH INCLUDE_DIR "/Users/athundt/source/grl/build" "/Users/athundt/source/grl/build/include")
130 
131 ## @brief Exclude certain files from coverage analysis.
132 set (
133  CTEST_CUSTOM_COVERAGE_EXCLUDE
134  ${CTEST_CUSTOM_COVERAGE_EXCLUDE} # keep current exclude expressions
135  "/CMakeFiles/CMakeTmp/" # exclude try_compile sources
136  "./test/.*" # exclude test implementations
137  "${PROJECT_MODULES_DIR}/.*/test/.*" # exclude test implementations of modules
138  # add further exclude expressions here
139 )
140 
141 ## @brief Specify additional files which should be considered for coverage report.
142 #
143 # Note that the expressions here are globbing expression as interpreted
144 # by CMake's file(GLOB) command, not regular expressions.
145 set (CTEST_EXTRA_COVERAGE_GLOB ${CTEST_EXTRA_COVERAGE_GLOB})
146 foreach (E IN ITEMS .c .cc .cpp .cxx .h .hh .hpp .hxx .txx .inl .inc)
147  list (APPEND CTEST_EXTRA_COVERAGE_GLOB
148  "${CODE_DIR}/*${E}"
149  )
150 endforeach ()
151 foreach (E IN ITEMS .h .hh .hpp .hxx .txx .inl .inc)
152  list (APPEND CTEST_EXTRA_COVERAGE_GLOB
153  "${INCLUDE_DIR}/*${E}"
154  )
155 endforeach ()
156 foreach (M IN LISTS "")
157  foreach (E IN ITEMS .h .hh .hpp .hxx .txx .inl .inc)
158  list (APPEND CTEST_EXTRA_COVERAGE_GLOB
159  "${MODULES_DIR}/${M}/${INCLUDE_DIR}/*${E}"
160  )
161  endforeach ()
162  foreach (E IN ITEMS .c .cc .cpp .cxx .h .hh .hpp .hxx .txx .inl .inc)
163  list (APPEND CTEST_EXTRA_COVERAGE_GLOB
164  "${MODULES_DIR}/${M}/${CODE_DIR}/*${E}"
165  )
166  endforeach ()
167 endforeach ()
168 
169 # ----------------------------------------------------------------------------
170 # memory check
171 # ----------------------------------------------------------------------------
172 
173 ## @brief Specify tests which should be ignored during the memory check stage.
174 set (
175  CTEST_CUSTOM_MEMCHECK_IGNORE
176  ""
177 )
178 
179 ## @brief Specify command to execute before execution of any test during memory check stage.
180 set (
181  CTEST_CUSTOM_PRE_MEMCHECK
182  ""
183 )
184 
185 ## @brief Specify command to execute at the end of the memory check stage.
186 set (
187  CTEST_CUSTOM_POST_MEMCHECK
188  ""
189 )
190 
191 # ----------------------------------------------------------------------------
192 # output
193 # ----------------------------------------------------------------------------
194 
195 ## @brief Adjust output size limit of failed tests in number of characters/bytes.
196 #
197 # Note: In order to have CTest ignore these limits and not truncate the test
198 # output, the string "CTEST_FULL_OUTPUT" has to be output by the test
199 # (e.g., as first line of the test output to stdout).
200 #
201 # See: http://public.kitware.com/pipermail/cdash/2009-November/000589.html
202 set (CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "1048576")
203 
204 ## @brief Adjust output size limit of failed tests in number of characters/bytes.
205 #
206 # Note: In order to have CTest ignore these limits and not truncate the test
207 # output, the string "CTEST_FULL_OUTPUT" has to be output by the test
208 # (e.g., as first line of the test output to stdout).
209 #
210 # See: http://public.kitware.com/pipermail/cdash/2009-November/000589.html
211 set (CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "102400")
or our tests failed to detect it correctly Please use a different C compiler or report this problem to the developers endif() if(UNIX AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") endif(UNIX AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") if(APPLE) set(CMAKE_MACOSX_RPATH ON)() endif() if(OpenCV_FOUND) if(NOT $
Definition: Settings.cmake:39