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