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)
23 base-array.cpp base-base64.cpp base-convert.cpp base-dictionary.cpp base-fifo.cpp
24 base-json.cpp base-match.cpp base-netstring.cpp base-object.cpp
25 base-serialize.cpp base-shellescape.cpp base-stacktrace.cpp
26 base-stream.cpp base-string.cpp base-timer.cpp base-type.cpp
27 base-value.cpp config-ops.cpp icinga-checkresult.cpp icinga-legacytimeperiod.cpp
28 icinga-macros.cpp icinga-notification.cpp
29 icinga-perfdata.cpp remote-url.cpp
32 if(ICINGA2_UNITY_BUILD)
33 mkunity_target(base test base_test_SOURCES)
37 SOURCES test-runner.cpp ${base_test_SOURCES}
38 TESTS base_array/construct
51 base_dictionary/construct
54 base_dictionary/foreach
55 base_dictionary/remove
62 base_netstring/netstring
67 base_serialize/dictionary
69 base_shellescape/escape_basic
70 base_shellescape/escape_quoted
71 base_stacktrace/stacktrace
72 base_stream/readline_stdio
95 icinga_checkresult/host_1attempt
96 icinga_checkresult/host_2attempts
97 icinga_checkresult/host_3attempts
98 icinga_checkresult/service_1attempt
99 icinga_checkresult/service_2attempts
100 icinga_checkresult/service_3attempts
101 icinga_checkresult/host_flapping_notification
102 icinga_checkresult/service_flapping_notification
103 icinga_notification/state_filter
104 icinga_notification/type_filter
106 icinga_legacytimeperiod/simple
107 icinga_perfdata/empty
108 icinga_perfdata/simple
109 icinga_perfdata/quotes
110 icinga_perfdata/multiple
112 icinga_perfdata/warncritminmax
113 icinga_perfdata/ignore_invalid_warn_crit_min_max
114 icinga_perfdata/invalid
115 icinga_perfdata/multi
116 remote_url/id_and_path
117 remote_url/parameters
118 remote_url/get_and_set
120 remote_url/illegal_legal_strings
123 add_whole_static_library(${base_TARGET_NAME} base)
124 add_whole_static_library(${base_TARGET_NAME} config)
125 add_whole_static_library(${base_TARGET_NAME} icinga)
127 if(ICINGA2_WITH_LIVESTATUS)
128 set(livestatus_test_SOURCES
132 if(ICINGA2_UNITY_BUILD)
133 mkunity_target(livestatus test livestatus_test_SOURCES)
136 add_boost_test(livestatus
137 SOURCES test-runner.cpp livestatus-fixture.cpp ${livestatus_test_SOURCES}
138 TESTS livestatus/hosts livestatus/services
141 add_whole_static_library(${livestatus_TARGET_NAME} base)
142 add_whole_static_library(${livestatus_TARGET_NAME} config)
143 add_whole_static_library(${livestatus_TARGET_NAME} icinga)
144 add_whole_static_library(${livestatus_TARGET_NAME} livestatus)
145 add_whole_static_library(${livestatus_TARGET_NAME} methods)
148 set(icinga_checkable_test_SOURCES
149 icinga-checkable-flapping.cpp
152 if(ICINGA2_UNITY_BUILD)
153 mkunity_target(icinga_checkable test icinga_checkable_test_SOURCES)
156 add_boost_test(icinga_checkable
157 SOURCES test-runner.cpp icinga-checkable-test.cpp ${icinga_checkable_test_SOURCES}
158 TESTS icinga_checkable_flapping/host_not_flapping
159 icinga_checkable_flapping/host_flapping
160 icinga_checkable_flapping/host_flapping_recover
161 icinga_checkable_flapping/host_flapping_docs_example
164 add_whole_static_library(${icinga_checkable_TARGET_NAME} base)
165 add_whole_static_library(${icinga_checkable_TARGET_NAME} config)
166 add_whole_static_library(${icinga_checkable_TARGET_NAME} icinga)
167 add_whole_static_library(${icinga_checkable_TARGET_NAME} cli)