2 # Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation
16 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
18 set(Boost_USE_STATIC_LIBS OFF)
20 include(BoostTestTargets)
41 icinga-checkresult.cpp
42 icinga-legacytimeperiod.cpp
44 icinga-notification.cpp
49 if(ICINGA2_UNITY_BUILD)
50 mkunity_target(base test base_test_SOURCES)
54 SOURCES test-runner.cpp ${base_test_SOURCES}
55 TESTS base_array/construct
68 base_dictionary/construct
71 base_dictionary/foreach
72 base_dictionary/remove
79 base_netstring/netstring
84 base_serialize/dictionary
86 base_shellescape/escape_basic
87 base_shellescape/escape_quoted
88 base_stacktrace/stacktrace
89 base_stream/readline_stdio
106 base_type/instantiate
112 icinga_checkresult/host_1attempt
113 icinga_checkresult/host_2attempts
114 icinga_checkresult/host_3attempts
115 icinga_checkresult/service_1attempt
116 icinga_checkresult/service_2attempts
117 icinga_checkresult/service_3attempts
118 icinga_checkresult/host_flapping_notification
119 icinga_checkresult/service_flapping_notification
120 icinga_notification/state_filter
121 icinga_notification/type_filter
123 icinga_legacytimeperiod/simple
124 icinga_perfdata/empty
125 icinga_perfdata/simple
126 icinga_perfdata/quotes
127 icinga_perfdata/multiple
129 icinga_perfdata/warncritminmax
130 icinga_perfdata/ignore_invalid_warn_crit_min_max
131 icinga_perfdata/invalid
132 icinga_perfdata/multi
133 remote_url/id_and_path
134 remote_url/parameters
135 remote_url/get_and_set
137 remote_url/illegal_legal_strings
140 add_whole_static_library(${base_TARGET_NAME} base)
141 add_whole_static_library(${base_TARGET_NAME} config)
142 add_whole_static_library(${base_TARGET_NAME} icinga)
144 if(ICINGA2_WITH_LIVESTATUS)
145 set(livestatus_test_SOURCES
146 livestatus-fixture.cpp
150 if(ICINGA2_UNITY_BUILD)
151 mkunity_target(livestatus test livestatus_test_SOURCES)
154 add_boost_test(livestatus
155 SOURCES test-runner.cpp ${livestatus_test_SOURCES}
156 TESTS livestatus/hosts livestatus/services
159 add_whole_static_library(${livestatus_TARGET_NAME} base)
160 add_whole_static_library(${livestatus_TARGET_NAME} config)
161 add_whole_static_library(${livestatus_TARGET_NAME} icinga)
162 add_whole_static_library(${livestatus_TARGET_NAME} livestatus)
163 add_whole_static_library(${livestatus_TARGET_NAME} methods)
166 set(icinga_checkable_test_SOURCES
167 icinga-checkable-fixture.cpp
168 icinga-checkable-flapping.cpp
171 if(ICINGA2_UNITY_BUILD)
172 mkunity_target(icinga_checkable test icinga_checkable_test_SOURCES)
175 add_boost_test(icinga_checkable
176 SOURCES test-runner.cpp ${icinga_checkable_test_SOURCES}
177 TESTS icinga_checkable_flapping/host_not_flapping
178 icinga_checkable_flapping/host_flapping
179 icinga_checkable_flapping/host_flapping_recover
180 icinga_checkable_flapping/host_flapping_docs_example
183 add_whole_static_library(${icinga_checkable_TARGET_NAME} base)
184 add_whole_static_library(${icinga_checkable_TARGET_NAME} config)
185 add_whole_static_library(${icinga_checkable_TARGET_NAME} icinga)
186 add_whole_static_library(${icinga_checkable_TARGET_NAME} cli)