]> granicus.if.org Git - icinga2/blob - test/CMakeLists.txt
Replace Copyright header with a short version, part II
[icinga2] / test / CMakeLists.txt
1 # Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+
2
3 include(BoostTestTargets)
4
5 set(base_test_SOURCES
6   icingaapplication-fixture.cpp
7   base-array.cpp
8   base-base64.cpp
9   base-convert.cpp
10   base-dictionary.cpp
11   base-fifo.cpp
12   base-json.cpp
13   base-match.cpp
14   base-netstring.cpp
15   base-object.cpp
16   base-object-packer.cpp
17   base-serialize.cpp
18   base-shellescape.cpp
19   base-stacktrace.cpp
20   base-stream.cpp
21   base-string.cpp
22   base-timer.cpp
23   base-type.cpp
24   base-utility.cpp
25   base-value.cpp
26   config-ops.cpp
27   icinga-checkresult.cpp
28   icinga-legacytimeperiod.cpp
29   icinga-macros.cpp
30   icinga-notification.cpp
31   icinga-perfdata.cpp
32   remote-url.cpp
33   ${base_OBJS}
34   $<TARGET_OBJECTS:config>
35   $<TARGET_OBJECTS:remote>
36   $<TARGET_OBJECTS:icinga>
37 )
38
39 if(ICINGA2_UNITY_BUILD)
40   mkunity_target(base test base_test_SOURCES)
41 endif()
42
43 add_boost_test(base
44   SOURCES test-runner.cpp ${base_test_SOURCES}
45   LIBRARIES ${base_DEPS}
46   TESTS
47     base_array/construct
48     base_array/getset
49     base_array/resize
50     base_array/insert
51     base_array/remove
52     base_array/unique
53     base_array/foreach
54     base_array/clone
55     base_array/json
56     base_base64/base64
57     base_convert/tolong
58     base_convert/todouble
59     base_convert/tostring
60     base_convert/tobool
61     base_dictionary/construct
62     base_dictionary/initializer1
63     base_dictionary/initializer2
64     base_dictionary/get1
65     base_dictionary/get2
66     base_dictionary/foreach
67     base_dictionary/remove
68     base_dictionary/clone
69     base_dictionary/json
70     base_fifo/construct
71     base_fifo/io
72     base_json/invalid1
73     base_object_packer/pack_null
74     base_object_packer/pack_false
75     base_object_packer/pack_true
76     base_object_packer/pack_number
77     base_object_packer/pack_string
78     base_object_packer/pack_array
79     base_object_packer/pack_object
80     base_match/tolong
81     base_netstring/netstring
82     base_object/construct
83     base_object/getself
84     base_serialize/scalar
85     base_serialize/array
86     base_serialize/dictionary
87     base_serialize/object
88     base_shellescape/escape_basic
89     base_shellescape/escape_quoted
90     base_stacktrace/stacktrace
91     base_stream/readline_stdio
92     base_string/construct
93     base_string/equal
94     base_string/clear
95     base_string/append
96     base_string/trim
97     base_string/contains
98     base_string/replace
99     base_string/index
100     base_string/find
101     base_timer/construct
102     base_timer/interval
103     base_timer/invoke
104     base_timer/scope
105     base_type/gettype
106     base_type/assign
107     base_type/byname
108     base_type/instantiate
109     base_utility/comparepasswords_works
110     base_utility/comparepasswords_issafe
111     base_value/scalar
112     base_value/convert
113     base_value/format
114     config_ops/simple
115     config_ops/advanced
116     icinga_checkresult/host_1attempt
117     icinga_checkresult/host_2attempts
118     icinga_checkresult/host_3attempts
119     icinga_checkresult/service_1attempt
120     icinga_checkresult/service_2attempts
121     icinga_checkresult/service_3attempts
122     icinga_checkresult/host_flapping_notification
123     icinga_checkresult/service_flapping_notification
124     icinga_notification/state_filter
125     icinga_notification/type_filter
126     icinga_macros/simple
127     icinga_legacytimeperiod/simple
128     icinga_perfdata/empty
129     icinga_perfdata/simple
130     icinga_perfdata/quotes
131     icinga_perfdata/multiple
132     icinga_perfdata/uom
133     icinga_perfdata/warncritminmax
134     icinga_perfdata/ignore_invalid_warn_crit_min_max
135     icinga_perfdata/invalid
136     icinga_perfdata/multi
137     remote_url/id_and_path
138     remote_url/parameters
139     remote_url/get_and_set
140     remote_url/format
141     remote_url/illegal_legal_strings
142 )
143
144 if(ICINGA2_WITH_LIVESTATUS)
145   set(livestatus_test_SOURCES
146     icingaapplication-fixture.cpp
147     livestatus-fixture.cpp
148     livestatus.cpp
149     ${base_OBJS}
150     $<TARGET_OBJECTS:config>
151     $<TARGET_OBJECTS:remote>
152     $<TARGET_OBJECTS:icinga>
153     $<TARGET_OBJECTS:livestatus>
154     $<TARGET_OBJECTS:methods>
155   )
156
157   if(ICINGA2_UNITY_BUILD)
158       mkunity_target(livestatus test livestatus_test_SOURCES)
159   endif()
160
161   add_boost_test(livestatus
162     SOURCES test-runner.cpp ${livestatus_test_SOURCES}
163     LIBRARIES ${base_DEPS}
164     TESTS livestatus/hosts livestatus/services
165   )
166 endif()
167
168 set(icinga_checkable_test_SOURCES
169   icingaapplication-fixture.cpp
170   icinga-checkable-fixture.cpp
171   icinga-checkable-flapping.cpp
172   ${base_OBJS}
173   $<TARGET_OBJECTS:config>
174   $<TARGET_OBJECTS:remote>
175   $<TARGET_OBJECTS:icinga>
176   $<TARGET_OBJECTS:cli>
177 )
178
179 if(ICINGA2_UNITY_BUILD)
180     mkunity_target(icinga_checkable test icinga_checkable_test_SOURCES)
181 endif()
182
183 add_boost_test(icinga_checkable
184   SOURCES test-runner.cpp ${icinga_checkable_test_SOURCES}
185   LIBRARIES ${base_DEPS}
186   TESTS icinga_checkable_flapping/host_not_flapping
187         icinga_checkable_flapping/host_flapping
188         icinga_checkable_flapping/host_flapping_recover
189         icinga_checkable_flapping/host_flapping_docs_example
190 )