2013-11-03 13:45:26 +01:00
|
|
|
# Icinga 2
|
2016-01-12 08:29:59 +01:00
|
|
|
# Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/)
|
2013-11-03 13:45:26 +01:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
include(BoostTestTargets)
|
|
|
|
|
2014-08-30 18:08:28 +02:00
|
|
|
set(base_test_SOURCES
|
|
|
|
base-array.cpp base-convert.cpp base-dictionary.cpp base-fifo.cpp
|
2014-10-26 19:59:49 +01:00
|
|
|
base-json.cpp base-match.cpp base-netstring.cpp base-object.cpp
|
|
|
|
base-serialize.cpp base-shellescape.cpp base-stacktrace.cpp
|
|
|
|
base-stream.cpp base-string.cpp base-timer.cpp base-type.cpp
|
2016-05-11 18:12:20 +02:00
|
|
|
base-value.cpp config-ops.cpp icinga-macros.cpp
|
2016-05-24 13:37:14 +02:00
|
|
|
icinga-perfdata.cpp base-test.cpp
|
2015-12-18 16:03:57 +01:00
|
|
|
remote-base64.cpp remote-url.cpp
|
2014-08-30 18:08:28 +02:00
|
|
|
)
|
|
|
|
|
2015-02-19 17:53:29 +01:00
|
|
|
set(livestatus_test_SOURCES
|
|
|
|
livestatus.cpp
|
2016-05-24 13:37:14 +02:00
|
|
|
livestatus-test.cpp
|
2015-02-19 17:53:29 +01:00
|
|
|
)
|
|
|
|
|
2014-09-01 09:19:21 +02:00
|
|
|
set_property(SOURCE test.cpp PROPERTY EXCLUDE_UNITY_BUILD TRUE)
|
|
|
|
|
2014-08-30 18:08:28 +02:00
|
|
|
if(ICINGA2_UNITY_BUILD)
|
|
|
|
mkunity_target(test base_test_SOURCES)
|
|
|
|
endif()
|
|
|
|
|
2013-11-03 13:45:26 +01:00
|
|
|
add_boost_test(base
|
2016-05-24 13:37:14 +02:00
|
|
|
SOURCES base-test.cpp ${base_test_SOURCES}
|
2013-11-07 13:37:58 +01:00
|
|
|
LIBRARIES base config icinga
|
2013-11-03 13:45:26 +01:00
|
|
|
TESTS base_array/construct
|
|
|
|
base_array/getset
|
2014-11-23 09:50:11 +01:00
|
|
|
base_array/resize
|
2013-12-12 13:53:27 +01:00
|
|
|
base_array/insert
|
2013-11-03 13:45:26 +01:00
|
|
|
base_array/remove
|
|
|
|
base_array/foreach
|
|
|
|
base_array/clone
|
2013-11-08 11:17:46 +01:00
|
|
|
base_array/json
|
2013-11-03 13:45:26 +01:00
|
|
|
base_convert/tolong
|
|
|
|
base_convert/todouble
|
|
|
|
base_convert/tostring
|
|
|
|
base_convert/tobool
|
|
|
|
base_dictionary/construct
|
|
|
|
base_dictionary/get1
|
|
|
|
base_dictionary/get2
|
|
|
|
base_dictionary/foreach
|
|
|
|
base_dictionary/remove
|
|
|
|
base_dictionary/clone
|
2013-11-08 11:17:46 +01:00
|
|
|
base_dictionary/json
|
2013-11-03 13:45:26 +01:00
|
|
|
base_fifo/construct
|
|
|
|
base_fifo/io
|
2014-10-26 19:59:49 +01:00
|
|
|
base_json/invalid1
|
2013-11-03 13:45:26 +01:00
|
|
|
base_match/tolong
|
|
|
|
base_netstring/netstring
|
|
|
|
base_object/construct
|
|
|
|
base_object/getself
|
2013-11-08 21:56:42 +01:00
|
|
|
base_serialize/scalar
|
|
|
|
base_serialize/array
|
|
|
|
base_serialize/dictionary
|
|
|
|
base_serialize/object
|
2013-11-03 13:45:26 +01:00
|
|
|
base_shellescape/escape_basic
|
|
|
|
base_shellescape/escape_quoted
|
|
|
|
base_stacktrace/stacktrace
|
2013-12-05 09:57:12 +01:00
|
|
|
base_stream/readline_stdio
|
2013-11-03 13:45:26 +01:00
|
|
|
base_string/construct
|
|
|
|
base_string/equal
|
|
|
|
base_string/clear
|
|
|
|
base_string/append
|
|
|
|
base_string/trim
|
2015-06-26 15:37:47 +02:00
|
|
|
base_string/contains
|
2013-11-03 13:45:26 +01:00
|
|
|
base_string/replace
|
|
|
|
base_string/index
|
|
|
|
base_string/find
|
|
|
|
base_timer/construct
|
|
|
|
base_timer/interval
|
2014-05-09 19:26:31 +02:00
|
|
|
base_timer/invoke
|
|
|
|
base_timer/scope
|
2015-06-26 15:37:47 +02:00
|
|
|
base_type/gettype
|
|
|
|
base_type/assign
|
|
|
|
base_type/byname
|
|
|
|
base_type/instantiate
|
2013-11-03 13:45:26 +01:00
|
|
|
base_value/scalar
|
|
|
|
base_value/convert
|
|
|
|
base_value/format
|
2015-06-26 15:37:47 +02:00
|
|
|
config_ops/simple
|
|
|
|
config_ops/advanced
|
|
|
|
icinga_macros/simple
|
|
|
|
icinga_perfdata/empty
|
|
|
|
icinga_perfdata/simple
|
|
|
|
icinga_perfdata/quotes
|
|
|
|
icinga_perfdata/multiple
|
|
|
|
icinga_perfdata/uom
|
|
|
|
icinga_perfdata/warncritminmax
|
|
|
|
icinga_perfdata/ignore_invalid_warn_crit_min_max
|
|
|
|
icinga_perfdata/invalid
|
|
|
|
icinga_perfdata/multi
|
2015-12-18 16:03:57 +01:00
|
|
|
remote_base64/base64
|
2015-07-16 13:48:16 +02:00
|
|
|
remote_url/id_and_path
|
|
|
|
remote_url/parameters
|
2015-09-01 11:11:45 +02:00
|
|
|
remote_url/get_and_set
|
2015-07-16 13:48:16 +02:00
|
|
|
remote_url/format
|
|
|
|
remote_url/illegal_legal_strings
|
2013-11-03 13:45:26 +01:00
|
|
|
)
|
|
|
|
|
2015-02-19 17:53:29 +01:00
|
|
|
if(ICINGA2_WITH_LIVESTATUS)
|
|
|
|
add_boost_test(livestatus
|
2016-05-24 13:37:14 +02:00
|
|
|
SOURCES livestatus-test.cpp ${livestatus_test_SOURCES}
|
2015-02-19 17:53:29 +01:00
|
|
|
LIBRARIES base config icinga cli livestatus
|
2016-05-24 13:37:14 +02:00
|
|
|
DEPENDENCIES methods
|
2015-02-19 17:53:29 +01:00
|
|
|
TESTS livestatus/hosts livestatus/services
|
|
|
|
)
|
|
|
|
endif()
|