Codebase list centreon-engine / c58a652
Removing Qt from ws_stub_builder. Dorian Guillois 11 years ago
3 changed file(s) with 180 addition(s) and 1319 deletion(s). Raw diff Collapse all Expand all
1616 ** <http://www.gnu.org/licenses/>.
1717 */
1818
19 #include <fstream>
20 #include <libgen.h>
1921 #include <map>
20 #include <QFile>
21 #include <QFileInfo>
22 #include <QTextStream>
2322 #include <sstream>
23 #include <stdlib.h>
2424 #include <string>
25 #include <string.h>
2526 #include "arg_definition.hh"
2627 #include "builder.hh"
2728 #include "error.hh"
9899 * Parse the soapStub.
99100 */
100101 void builder::parse() {
101 QFile file(_header_src.c_str());
102 if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
103 throw (error(file.errorString().toStdString().c_str()));
104
105 while (!file.atEnd()) {
106 std::string data(QString(file.readLine()).toStdString());
102 std::ifstream file(_header_src.c_str(), std::ios_base::in);
103 if (!file.is_open())
104 throw (error("open file failed"));
105
106 while (file.good()) {
107 std::string data;
108 std::getline(file, data, '\n');
107109 if (!function::is_valid(data))
108110 continue ;
109111 function func(data);
110112 func.build();
111113 _lst_function.push_back(func);
112114 }
113
114 file.close();
115115 }
116116
117117 /**
123123 }
124124
125125 /**
126 * Get the filename from a file path.
127 *
128 * @param[in] path The file path.
129 *
130 * @return The filename.
131 */
132 std::string builder::_basename(std::string const& path) {
133 char* _path(strdup(path.c_str()));
134 std::string filename(basename(_path));
135 free(_path);
136 return (filename);
137 }
138
139 /**
126140 * Build auto_gen header.
127141 */
128142 void builder::_build_header() {
129 QFile file(_header_dst.c_str());
130 if (file.open(QIODevice::WriteOnly
131 | QIODevice::Text
132 | QIODevice::Truncate) == false) {
133 throw (error(file.errorString().toStdString().c_str()));
134 }
135 QTextStream stream(&file);
136 stream << copyright << "\n";
137
138 QFileInfo file_info(_header_src.c_str());
139 stream << "#ifndef CCE_MOD_WS_CLIENT_AUTO_GEN_HH\n"
140 << "# define CCE_MOD_WS_CLIENT_AUTO_GEN_HH\n\n"
141 << "# include <map>\n"
142 << "# include <string>\n"
143 << "# include \"" << file_info.fileName() << "\"\n\n"
144 << "class auto_gen {\n"
145 << "public:\n"
146 << " static auto_gen& instance();\n\n"
147 << " void show_help() const;\n"
148 << " void show_help(std::string const& name) const;\n"
149 << " bool execute(std::string const& name, soap* s, char const* end_point, char const* action, std::map<std::string, std::string>& args) const;\n\n"
150 << "private:\n"
151 << " auto_gen();\n"
152 << " auto_gen(auto_gen const& right);\n"
153 << " ~auto_gen() throw();\n\n"
154 << " auto_gen& operator=(auto_gen const& right);\n\n"
155 << " std::map<std::string, void (*)()> _help;\n"
156 << " std::map<std::string, bool (*)(soap*, char const*, char const*, std::map<std::string, std::string>&)> _exec;\n"
157 << "};\n\n"
158 << "#endif // !CCE_MOD_WS_CLIENT_AUTO_GEN_HH\n";
143 std::ofstream file(
144 _header_dst.c_str(),
145 std::ios_base::out | std::ios_base::trunc);
146 if (!file.is_open())
147 throw (error("open file failed"));
148
149 file << copyright << "\n"
150 << "#ifndef CCE_MOD_WS_CLIENT_AUTO_GEN_HH\n"
151 << "# define CCE_MOD_WS_CLIENT_AUTO_GEN_HH\n\n"
152 << "# include <map>\n"
153 << "# include <string>\n"
154 << "# include \"" << _basename(_header_src) << "\"\n\n"
155 << "class auto_gen {\n"
156 << "public:\n"
157 << " static auto_gen& instance();\n\n"
158 << " void show_help() const;\n"
159 << " void show_help(std::string const& name) const;\n"
160 << " bool execute(std::string const& name, soap* s, char const* end_point, char const* action, std::map<std::string, std::string>& args) const;\n\n"
161 << "private:\n"
162 << " auto_gen();\n"
163 << " auto_gen(auto_gen const& right);\n"
164 << " ~auto_gen() throw();\n\n"
165 << " auto_gen& operator=(auto_gen const& right);\n\n"
166 << " std::map<std::string, void (*)()> _help;\n"
167 << " std::map<std::string, bool (*)(soap*, char const*, char const*, std::map<std::string, std::string>&)> _exec;\n"
168 << "};\n\n"
169 << "#endif // !CCE_MOD_WS_CLIENT_AUTO_GEN_HH\n";
159170 }
160171
161172 /**
162173 * Build auto_gen source code.
163174 */
164175 void builder::_build_source() {
165 QFile file(_source_dst.c_str());
166 if (file.open(QIODevice::WriteOnly
167 | QIODevice::Text
168 | QIODevice::Truncate) == false) {
169 throw (error(file.errorString().toStdString().c_str()));
170 }
171 QTextStream stream(&file);
172 stream << copyright << "\n";
173
174 QFileInfo file_info(_header_dst.c_str());
175 stream << "#include <cstdlib>\n"
176 << "#include <list>\n"
177 << "#include <ostream>\n"
178 << "#include <string>\n"
179 << "#include <vector>\n"
180 << "#include \"com/centreon/engine/modules/webservice/error.hh\"\n"
181 << "#include \"" << file_info.fileName() << "\"\n\n"
182 << "using namespace com::centreon::engine::modules::webservice;\n\n";
183
184 stream << "static std::string toStdString(std::string const& str) {\n"
185 << " return (str);\n"
186 << "}\n\n";
187
188 stream << "static double toDouble(std::string const& str) {\n"
189 << " return (strtod(str.c_str(), NULL));\n"
190 << "}\n\n";
191
192 stream << "static float toFloat(std::string const& str) {\n"
193 << " return (strtof(str.c_str(), NULL));\n"
194 << "}\n\n";
195
196 stream << "static int toInt(std::string const& str) {\n"
197 << " return (strtol(str.c_str(), NULL, 0));\n"
198 << "}\n\n";
199
200 stream << "static long long toLongLong(std::string const& str) {\n"
201 << " return (strtoll(str.c_str(), NULL, 0));\n"
202 << "}\n\n";
203
204 stream << "static unsigned int toUInt(std::string const& str) {\n"
205 << " return (strtoul(str.c_str(), NULL, 0));\n"
206 << "}\n\n";
207
208 stream << "static unsigned long long toULongLong(std::string const& str) {\n"
209 << " return (strtoull(str.c_str(), NULL, 0));\n"
210 << "}\n\n";
211
212 stream << "static std::vector<std::string> toStdVector(std::string const& str) {\n"
213 << " std::list<std::string> tmp;\n"
214 << " size_t prev(0);\n"
215 << " size_t current;\n"
216 << " while ((current = str.find(',', prev)) != std::string::npos) {\n"
217 << " tmp.push_back(str.substr(prev, current - prev));\n"
218 << " prev = current + 1;\n"
219 << " }\n"
220 << " tmp.push_back(str.substr(prev));\n"
221 << "\n"
222 << " std::vector<std::string> tab;\n"
223 << " for (std::list<std::string>::const_iterator\n"
224 << " it(tmp.begin()),\n"
225 << " end(tmp.end());\n"
226 << " it != end;\n"
227 << " ++it)\n"
228 << " tab.push_back(*it);\n"
229 << " return (tab);\n"
230 << "}\n\n";
231
232 stream << "template <typename T>\n"
233 << "static std::ostream& operator<<(\n"
234 << " std::ostream& os,\n"
235 << " std::vector<T> const& cls) {\n"
236 << " os << \"{\";\n"
237 << " for (typename std::vector<T>::const_iterator\n"
238 << " it(cls.begin()),\n"
239 << " end(cls.end());\n"
240 << " it != end;\n"
241 << " ++it) {\n"
242 << " if (it + 1 != end)\n"
243 << " os << *it << \", \";\n"
244 << " else\n"
245 << " os << *it;\n"
246 << " }\n"
247 << " os << \"}\";\n"
248 << "\n"
249 << " return (os);\n"
250 << "}\n\n";
176 std::ofstream file(
177 _source_dst.c_str(),
178 std::ios_base::out | std::ios_base::trunc);
179 if (!file.is_open())
180 throw (error("open file failed"));
181
182 file << copyright << "\n"
183 << "#include <cstdlib>\n"
184 << "#include <list>\n"
185 << "#include <ostream>\n"
186 << "#include <string>\n"
187 << "#include <vector>\n"
188 << "#include \"com/centreon/engine/modules/webservice/error.hh\"\n"
189 << "#include \"" << _basename(_header_dst) << "\"\n\n"
190 << "using namespace com::centreon::engine::modules::webservice;\n\n";
191
192 file << "static std::string toStdString(std::string const& str) {\n"
193 << " return (str);\n"
194 << "}\n\n";
195
196 file << "static double toDouble(std::string const& str) {\n"
197 << " return (strtod(str.c_str(), NULL));\n"
198 << "}\n\n";
199
200 file << "static float toFloat(std::string const& str) {\n"
201 << " return (strtof(str.c_str(), NULL));\n"
202 << "}\n\n";
203
204 file << "static int toInt(std::string const& str) {\n"
205 << " return (strtol(str.c_str(), NULL, 0));\n"
206 << "}\n\n";
207
208 file << "static long long toLongLong(std::string const& str) {\n"
209 << " return (strtoll(str.c_str(), NULL, 0));\n"
210 << "}\n\n";
211
212 file << "static unsigned int toUInt(std::string const& str) {\n"
213 << " return (strtoul(str.c_str(), NULL, 0));\n"
214 << "}\n\n";
215
216 file << "static unsigned long long toULongLong(std::string const& str) {\n"
217 << " return (strtoull(str.c_str(), NULL, 0));\n"
218 << "}\n\n";
219
220 file << "static std::vector<std::string> toStdVector(std::string const& str) {\n"
221 << " std::list<std::string> tmp;\n"
222 << " size_t prev(0);\n"
223 << " size_t current;\n"
224 << " while ((current = str.find(',', prev)) != std::string::npos) {\n"
225 << " tmp.push_back(str.substr(prev, current - prev));\n"
226 << " prev = current + 1;\n"
227 << " }\n"
228 << " tmp.push_back(str.substr(prev));\n"
229 << "\n"
230 << " std::vector<std::string> tab;\n"
231 << " for (std::list<std::string>::const_iterator\n"
232 << " it(tmp.begin()),\n"
233 << " end(tmp.end());\n"
234 << " it != end;\n"
235 << " ++it)\n"
236 << " tab.push_back(*it);\n"
237 << " return (tab);\n"
238 << "}\n\n";
239
240 file << "template <typename T>\n"
241 << "static std::ostream& operator<<(\n"
242 << " std::ostream& os,\n"
243 << " std::vector<T> const& cls) {\n"
244 << " os << \"{\";\n"
245 << " for (typename std::vector<T>::const_iterator\n"
246 << " it(cls.begin()),\n"
247 << " end(cls.end());\n"
248 << " it != end;\n"
249 << " ++it) {\n"
250 << " if (it + 1 != end)\n"
251 << " os << *it << \", \";\n"
252 << " else\n"
253 << " os << *it;\n"
254 << " }\n"
255 << " os << \"}\";\n"
256 << "\n"
257 << " return (os);\n"
258 << "}\n\n";
251259
252260 std::list<argument> args(arg_definition::instance().get_arguments());
253261 for (std::list<argument>::const_iterator
256264 it != end;
257265 ++it) {
258266 if (!it->is_primitive())
259 stream << "static std::ostream& operator<<(std::ostream& os, "
260 << it->get_type().c_str() << " const& cls) {\n"
261 << _build_ostream_struct("cls.", *it).c_str()
262 << "\n"
263 << " return (os);\n"
264 << "}\n\n";
267 file << "static std::ostream& operator<<(std::ostream& os, "
268 << it->get_type().c_str() << " const& cls) {\n"
269 << _build_ostream_struct("cls.", *it).c_str()
270 << "\n"
271 << " return (os);\n"
272 << "}\n\n";
265273 }
266274
267275 for (std::list<function>::const_iterator
269277 end(_lst_function.end());
270278 it != end;
271279 ++it)
272 stream << "static " << it->get_help_function().c_str() << "\n\n";
280 file << "static " << it->get_help_function().c_str() << "\n\n";
273281
274282 for (std::list<function>::const_iterator
275283 it(_lst_function.begin()),
276284 end(_lst_function.end());
277285 it != end;
278286 ++it)
279 stream << "static " << it->get_exec_function().c_str() << "\n\n";
280
281 stream << "auto_gen& auto_gen::instance() {\n"
282 << " static auto_gen instance;\n"
283 << " return (instance);\n"
284 << "}\n\n"
285 << "void auto_gen::show_help() const {\n"
286 << " for (std::map<std::string, void(*)()>::const_iterator it(_help.begin()), end(_help.end());\n"
287 << " it != end;\n"
288 << " ++it) {\n"
289 << " it->second();\n"
290 << " }\n"
291 << "}\n\n"
292 << "void auto_gen::show_help(std::string const& name) const {\n"
293 << " std::map<std::string, void (*)()>::const_iterator it(_help.find(name));\n"
294 << " if (it == _help.end())\n"
295 << " throw (error(\"function not found\"));\n"
296 << " it->second();\n"
297 << "}\n\n"
298 << "bool auto_gen::execute(std::string const& name, soap* s, char const* end_point, char const* action, std::map<std::string, std::string>& args) const {\n"
299 << " std::map<std::string, bool (*)(soap*, char const*, char const*, std::map<std::string, std::string>&)>::const_iterator it = _exec.find(name);\n"
300 << " if (it == _exec.end())\n"
301 << " throw (error(\"function not found.\"));\n"
302 << " \n"
303 << " return (it->second(s, end_point, action, args));\n"
304 << "}\n\n"
305 << "auto_gen::auto_gen() {\n";
287 file << "static " << it->get_exec_function().c_str() << "\n\n";
288
289 file << "auto_gen& auto_gen::instance() {\n"
290 << " static auto_gen instance;\n"
291 << " return (instance);\n"
292 << "}\n\n"
293 << "void auto_gen::show_help() const {\n"
294 << " for (std::map<std::string, void(*)()>::const_iterator it(_help.begin()), end(_help.end());\n"
295 << " it != end;\n"
296 << " ++it) {\n"
297 << " it->second();\n"
298 << " }\n"
299 << "}\n\n"
300 << "void auto_gen::show_help(std::string const& name) const {\n"
301 << " std::map<std::string, void (*)()>::const_iterator it(_help.find(name));\n"
302 << " if (it == _help.end())\n"
303 << " throw (error(\"function not found\"));\n"
304 << " it->second();\n"
305 << "}\n\n"
306 << "bool auto_gen::execute(std::string const& name, soap* s, char const* end_point, char const* action, std::map<std::string, std::string>& args) const {\n"
307 << " std::map<std::string, bool (*)(soap*, char const*, char const*, std::map<std::string, std::string>&)>::const_iterator it = _exec.find(name);\n"
308 << " if (it == _exec.end())\n"
309 << " throw (error(\"function not found.\"));\n"
310 << " \n"
311 << " return (it->second(s, end_point, action, args));\n"
312 << "}\n\n"
313 << "auto_gen::auto_gen() {\n";
306314
307315 for (std::list<function>::const_iterator
308316 it(_lst_function.begin()),
309317 end(_lst_function.end());
310318 it != end;
311319 ++it)
312 stream << " _help[\"" << it->get_name().c_str()
313 << "\"] = &" << it->get_help_name().c_str() << ";\n";
314 stream << "\n";
320 file << " _help[\"" << it->get_name().c_str()
321 << "\"] = &" << it->get_help_name().c_str() << ";\n";
322 file << "\n";
315323 for (std::list<function>::const_iterator
316324 it(_lst_function.begin()),
317325 end(_lst_function.end());
318326 it != end;
319327 ++it)
320 stream << " _exec[\"" << it->get_name().c_str()
321 << "\"] = &" << it->get_exec_name().c_str() << ";\n";
322
323 stream << "}\n\n"
324 << "auto_gen::~auto_gen() throw () {\n"
325 << "\n"
326 << "}\n\n";
328 file << " _exec[\"" << it->get_name().c_str()
329 << "\"] = &" << it->get_exec_name().c_str() << ";\n";
330
331 file << "}\n\n"
332 << "auto_gen::~auto_gen() throw () {\n"
333 << "\n"
334 << "}\n\n";
327335 }
328336
329337 /**
4747 void parse();
4848
4949 private:
50 static std::string _basename(std::string const& path);
5051 void _build_header();
5152 std::string _build_ostream_struct(
5253 std::string const& base,
+0
-1148
test/modules/external_commands/CMakeLists.txt less more
0 # Test calling enter_standby_mode.
1 set(TEST_NAME "modules_external_command_enter_standby_mode")
2 add_executable("${TEST_NAME}"
3 "${TEST_DIR}/enter_standby_mode.cc")
4 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
5 add_test("${TEST_NAME}" "${TEST_NAME}")
6
7 # Test calling disable_notifications.
8 set(TEST_NAME "modules_external_command_disable_notifications")
9 add_executable("${TEST_NAME}"
10 "${TEST_DIR}/disable_notifications.cc")
11 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
12 add_test("${TEST_NAME}" "${TEST_NAME}")
13
14 # Test calling enter_active_mode.
15 set(TEST_NAME "modules_external_command_enter_active_mode")
16 add_executable("${TEST_NAME}"
17 "${TEST_DIR}/enter_active_mode.cc")
18 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
19 add_test("${TEST_NAME}" "${TEST_NAME}")
20
21 # Test calling enable_notifications.
22 set(TEST_NAME "modules_external_command_enable_notifications")
23 add_executable("${TEST_NAME}"
24 "${TEST_DIR}/enable_notifications.cc")
25 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
26 add_test("${TEST_NAME}" "${TEST_NAME}")
27
28 # Test calling shutdown_program.
29 set(TEST_NAME "modules_external_command_shutdown_program")
30 add_executable("${TEST_NAME}"
31 "${TEST_DIR}/shutdown_program.cc")
32 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
33 add_test("${TEST_NAME}" "${TEST_NAME}")
34
35 # Test calling shutdown_process.
36 set(TEST_NAME "modules_external_command_shutdown_process")
37 add_executable("${TEST_NAME}"
38 "${TEST_DIR}/shutdown_process.cc")
39 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
40 add_test("${TEST_NAME}" "${TEST_NAME}")
41
42 # Test calling restart_program.
43 set(TEST_NAME "modules_external_command_restart_program")
44 add_executable("${TEST_NAME}"
45 "${TEST_DIR}/restart_program.cc")
46 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
47 add_test("${TEST_NAME}" "${TEST_NAME}")
48
49 # Test calling restart_process.
50 set(TEST_NAME "modules_external_command_restart_process")
51 add_executable("${TEST_NAME}"
52 "${TEST_DIR}/restart_process.cc")
53 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
54 add_test("${TEST_NAME}" "${TEST_NAME}")
55
56 # Test calling save_state_information.
57 set(TEST_NAME "modules_external_command_save_state_information")
58 add_executable("${TEST_NAME}"
59 "${TEST_DIR}/save_state_information.cc")
60 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
61 add_test("${TEST_NAME}" "${TEST_NAME}")
62
63 # Test calling read_state_information.
64 set(TEST_NAME "modules_external_command_read_state_information")
65 add_executable("${TEST_NAME}"
66 "${TEST_DIR}/read_state_information.cc")
67 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
68 add_test("${TEST_NAME}" "${TEST_NAME}")
69
70 # Test calling enable_event_handlers.
71 set(TEST_NAME "modules_external_command_enable_event_handlers")
72 add_executable("${TEST_NAME}"
73 "${TEST_DIR}/enable_event_handlers.cc")
74 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
75 add_test("${TEST_NAME}" "${TEST_NAME}")
76
77 # Test calling disable_event_handlers.
78 set(TEST_NAME "modules_external_command_disable_event_handlers")
79 add_executable("${TEST_NAME}"
80 "${TEST_DIR}/disable_event_handlers.cc")
81 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
82 add_test("${TEST_NAME}" "${TEST_NAME}")
83
84 # Test calling flush_pending_commands.
85 set(TEST_NAME "modules_external_command_flush_pending_commands")
86 add_executable("${TEST_NAME}"
87 "${TEST_DIR}/flush_pending_commands.cc")
88 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
89 add_test("${TEST_NAME}" "${TEST_NAME}")
90
91 # Test calling enable_failure_prediction.
92 set(TEST_NAME "modules_external_command_enable_failure_prediction")
93 add_executable("${TEST_NAME}"
94 "${TEST_DIR}/enable_failure_prediction.cc")
95 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
96 add_test("${TEST_NAME}" "${TEST_NAME}")
97
98 # Test calling disable_failure_prediction.
99 set(TEST_NAME "modules_external_command_disable_failure_prediction")
100 add_executable("${TEST_NAME}"
101 "${TEST_DIR}/disable_failure_prediction.cc")
102 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
103 add_test("${TEST_NAME}" "${TEST_NAME}")
104
105 # Test calling enable_performance_data.
106 set(TEST_NAME "modules_external_command_enable_performance_data")
107 add_executable("${TEST_NAME}"
108 "${TEST_DIR}/enable_performance_data.cc")
109 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
110 add_test("${TEST_NAME}" "${TEST_NAME}")
111
112 # Test calling disable_performance_data.
113 set(TEST_NAME "modules_external_command_disable_performance_data")
114 add_executable("${TEST_NAME}"
115 "${TEST_DIR}/disable_performance_data.cc")
116 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
117 add_test("${TEST_NAME}" "${TEST_NAME}")
118
119 # Test calling start_executing_host_checks.
120 set(TEST_NAME "modules_external_command_start_executing_host_checks")
121 add_executable("${TEST_NAME}"
122 "${TEST_DIR}/start_executing_host_checks.cc")
123 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
124 add_test("${TEST_NAME}" "${TEST_NAME}")
125
126 # Test calling stop_executing_host_checks.
127 set(TEST_NAME "modules_external_command_stop_executing_host_checks")
128 add_executable("${TEST_NAME}"
129 "${TEST_DIR}/stop_executing_host_checks.cc")
130 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
131 add_test("${TEST_NAME}" "${TEST_NAME}")
132
133 # Test calling start_executing_svc_checks.
134 set(TEST_NAME "modules_external_command_start_executing_svc_checks")
135 add_executable("${TEST_NAME}"
136 "${TEST_DIR}/start_executing_svc_checks.cc")
137 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
138 add_test("${TEST_NAME}" "${TEST_NAME}")
139
140 # Test calling stop_executing_svc_checks.
141 set(TEST_NAME "modules_external_command_stop_executing_svc_checks")
142 add_executable("${TEST_NAME}"
143 "${TEST_DIR}/stop_executing_svc_checks.cc")
144 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
145 add_test("${TEST_NAME}" "${TEST_NAME}")
146
147 # Test calling start_accepting_passive_host_checks.
148 set(TEST_NAME "modules_external_command_start_accepting_passive_host_checks")
149 add_executable("${TEST_NAME}"
150 "${TEST_DIR}/start_accepting_passive_host_checks.cc")
151 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
152 add_test("${TEST_NAME}" "${TEST_NAME}")
153
154 # Test calling stop_accepting_passive_host_checks.
155 set(TEST_NAME "modules_external_command_stop_accepting_passive_host_checks")
156 add_executable("${TEST_NAME}"
157 "${TEST_DIR}/stop_accepting_passive_host_checks.cc")
158 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
159 add_test("${TEST_NAME}" "${TEST_NAME}")
160
161 # Test calling start_accepting_passive_svc_checks.
162 set(TEST_NAME "modules_external_command_start_accepting_passive_svc_checks")
163 add_executable("${TEST_NAME}"
164 "${TEST_DIR}/start_accepting_passive_svc_checks.cc")
165 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
166 add_test("${TEST_NAME}" "${TEST_NAME}")
167
168 # Test calling stop_accepting_passive_svc_checks.
169 set(TEST_NAME "modules_external_command_stop_accepting_passive_svc_checks")
170 add_executable("${TEST_NAME}"
171 "${TEST_DIR}/stop_accepting_passive_svc_checks.cc")
172 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
173 add_test("${TEST_NAME}" "${TEST_NAME}")
174
175 # Test calling start_obsessing_over_host_checks.
176 set(TEST_NAME "modules_external_command_start_obsessing_over_host_checks")
177 add_executable("${TEST_NAME}"
178 "${TEST_DIR}/start_obsessing_over_host_checks.cc")
179 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
180 add_test("${TEST_NAME}" "${TEST_NAME}")
181
182 # Test calling stop_obsessing_over_host_checks.
183 set(TEST_NAME "modules_external_command_stop_obsessing_over_host_checks")
184 add_executable("${TEST_NAME}"
185 "${TEST_DIR}/stop_obsessing_over_host_checks.cc")
186 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
187 add_test("${TEST_NAME}" "${TEST_NAME}")
188
189 # Test calling start_obsessing_over_svc_checks.
190 set(TEST_NAME "modules_external_command_start_obsessing_over_svc_checks")
191 add_executable("${TEST_NAME}"
192 "${TEST_DIR}/start_obsessing_over_svc_checks.cc")
193 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
194 add_test("${TEST_NAME}" "${TEST_NAME}")
195
196 # Test calling stop_obsessing_over_svc_checks.
197 set(TEST_NAME "modules_external_command_stop_obsessing_over_svc_checks")
198 add_executable("${TEST_NAME}"
199 "${TEST_DIR}/stop_obsessing_over_svc_checks.cc")
200 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
201 add_test("${TEST_NAME}" "${TEST_NAME}")
202
203 # Test calling enable_flap_detection.
204 set(TEST_NAME "modules_external_command_enable_flap_detection")
205 add_executable("${TEST_NAME}"
206 "${TEST_DIR}/enable_flap_detection.cc")
207 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
208 add_test("${TEST_NAME}" "${TEST_NAME}")
209
210 # Test calling disable_flap_detection.
211 set(TEST_NAME "modules_external_command_disable_flap_detection")
212 add_executable("${TEST_NAME}"
213 "${TEST_DIR}/disable_flap_detection.cc")
214 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
215 add_test("${TEST_NAME}" "${TEST_NAME}")
216
217 # Test calling change_global_host_event_handler.
218 set(TEST_NAME "modules_external_command_change_global_host_event_handler")
219 add_executable("${TEST_NAME}"
220 "${TEST_DIR}/change_global_host_event_handler.cc")
221 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
222 add_test("${TEST_NAME}" "${TEST_NAME}")
223
224 # Test calling change_global_svc_event_handler.
225 set(TEST_NAME "modules_external_command_change_global_svc_event_handler")
226 add_executable("${TEST_NAME}"
227 "${TEST_DIR}/change_global_svc_event_handler.cc")
228 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
229 add_test("${TEST_NAME}" "${TEST_NAME}")
230
231 # Test calling enable_service_freshness_checks.
232 set(TEST_NAME "modules_external_command_enable_service_freshness_checks")
233 add_executable("${TEST_NAME}"
234 "${TEST_DIR}/enable_service_freshness_checks.cc")
235 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
236 add_test("${TEST_NAME}" "${TEST_NAME}")
237
238 # Test calling disable_service_freshness_checks.
239 set(TEST_NAME "modules_external_command_disable_service_freshness_checks")
240 add_executable("${TEST_NAME}"
241 "${TEST_DIR}/disable_service_freshness_checks.cc")
242 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
243 add_test("${TEST_NAME}" "${TEST_NAME}")
244
245 # Test calling enable_host_freshness_checks.
246 set(TEST_NAME "modules_external_command_enable_host_freshness_checks")
247 add_executable("${TEST_NAME}"
248 "${TEST_DIR}/enable_host_freshness_checks.cc")
249 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
250 add_test("${TEST_NAME}" "${TEST_NAME}")
251
252 # Test calling disable_host_freshness_checks.
253 set(TEST_NAME "modules_external_command_disable_host_freshness_checks")
254 add_executable("${TEST_NAME}"
255 "${TEST_DIR}/disable_host_freshness_checks.cc")
256 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
257 add_test("${TEST_NAME}" "${TEST_NAME}")
258
259 # Test calling add_host_comment.
260 set(TEST_NAME "modules_external_command_add_host_comment")
261 add_executable("${TEST_NAME}"
262 "${TEST_DIR}/add_host_comment.cc")
263 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
264 add_test("${TEST_NAME}" "${TEST_NAME}")
265
266 # Test calling del_host_comment.
267 set(TEST_NAME "modules_external_command_del_host_comment")
268 add_executable("${TEST_NAME}"
269 "${TEST_DIR}/del_host_comment.cc")
270 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
271 add_test("${TEST_NAME}" "${TEST_NAME}")
272
273 # Test calling del_all_host_comments.
274 set(TEST_NAME "modules_external_command_del_all_host_comments")
275 add_executable("${TEST_NAME}"
276 "${TEST_DIR}/del_all_host_comments.cc")
277 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
278 add_test("${TEST_NAME}" "${TEST_NAME}")
279
280 # Test calling delay_host_notification.
281 set(TEST_NAME "modules_external_command_delay_host_notification")
282 add_executable("${TEST_NAME}"
283 "${TEST_DIR}/delay_host_notification.cc")
284 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
285 add_test("${TEST_NAME}" "${TEST_NAME}")
286
287 # Test calling enable_host_notifications.
288 set(TEST_NAME "modules_external_command_enable_host_notifications")
289 add_executable("${TEST_NAME}"
290 "${TEST_DIR}/enable_host_notifications.cc")
291 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
292 add_test("${TEST_NAME}" "${TEST_NAME}")
293
294 # Test calling disable_host_notifications.
295 set(TEST_NAME "modules_external_command_disable_host_notifications")
296 add_executable("${TEST_NAME}"
297 "${TEST_DIR}/disable_host_notifications.cc")
298 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
299 add_test("${TEST_NAME}" "${TEST_NAME}")
300
301 # Test calling enable_all_notifications_beyond_host.
302 set(TEST_NAME "modules_external_command_enable_all_notifications_beyond_host")
303 add_executable("${TEST_NAME}"
304 "${TEST_DIR}/enable_all_notifications_beyond_host.cc")
305 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
306 add_test("${TEST_NAME}" "${TEST_NAME}")
307
308 # Test calling disable_all_notifications_beyond_host.
309 set(TEST_NAME "modules_external_command_disable_all_notifications_beyond_host")
310 add_executable("${TEST_NAME}"
311 "${TEST_DIR}/disable_all_notifications_beyond_host.cc")
312 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
313 add_test("${TEST_NAME}" "${TEST_NAME}")
314
315 # Test calling enable_host_and_child_notifications.
316 set(TEST_NAME "modules_external_command_enable_host_and_child_notifications")
317 add_executable("${TEST_NAME}"
318 "${TEST_DIR}/enable_host_and_child_notifications.cc")
319 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
320 add_test("${TEST_NAME}" "${TEST_NAME}")
321
322 # Test calling disable_host_and_child_notifications.
323 set(TEST_NAME "modules_external_command_disable_host_and_child_notifications")
324 add_executable("${TEST_NAME}"
325 "${TEST_DIR}/disable_host_and_child_notifications.cc")
326 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
327 add_test("${TEST_NAME}" "${TEST_NAME}")
328
329 # Test calling enable_host_svc_notifications.
330 set(TEST_NAME "modules_external_command_enable_host_svc_notifications")
331 add_executable("${TEST_NAME}"
332 "${TEST_DIR}/enable_host_svc_notifications.cc")
333 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
334 add_test("${TEST_NAME}" "${TEST_NAME}")
335
336 # Test calling disable_host_svc_notifications.
337 set(TEST_NAME "modules_external_command_disable_host_svc_notifications")
338 add_executable("${TEST_NAME}"
339 "${TEST_DIR}/disable_host_svc_notifications.cc")
340 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
341 add_test("${TEST_NAME}" "${TEST_NAME}")
342
343 # Test calling enable_host_svc_checks.
344 set(TEST_NAME "modules_external_command_enable_host_svc_checks")
345 add_executable("${TEST_NAME}"
346 "${TEST_DIR}/enable_host_svc_checks.cc")
347 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
348 add_test("${TEST_NAME}" "${TEST_NAME}")
349
350 # Test calling disable_host_svc_checks.
351 set(TEST_NAME "modules_external_command_disable_host_svc_checks")
352 add_executable("${TEST_NAME}"
353 "${TEST_DIR}/disable_host_svc_checks.cc")
354 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
355 add_test("${TEST_NAME}" "${TEST_NAME}")
356
357 # Test calling enable_passive_host_checks.
358 set(TEST_NAME "modules_external_command_enable_passive_host_checks")
359 add_executable("${TEST_NAME}"
360 "${TEST_DIR}/enable_passive_host_checks.cc")
361 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
362 add_test("${TEST_NAME}" "${TEST_NAME}")
363
364 # Test calling disable_passive_host_checks.
365 set(TEST_NAME "modules_external_command_disable_passive_host_checks")
366 add_executable("${TEST_NAME}"
367 "${TEST_DIR}/disable_passive_host_checks.cc")
368 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
369 add_test("${TEST_NAME}" "${TEST_NAME}")
370
371 # Test calling schedule_host_svc_checks.
372 set(TEST_NAME "modules_external_command_schedule_host_svc_checks")
373 add_executable("${TEST_NAME}"
374 "${TEST_DIR}/schedule_host_svc_checks.cc")
375 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
376 add_test("${TEST_NAME}" "${TEST_NAME}")
377
378 # Test calling schedule_forced_host_svc_checks.
379 set(TEST_NAME "modules_external_command_schedule_forced_host_svc_checks")
380 add_executable("${TEST_NAME}"
381 "${TEST_DIR}/schedule_forced_host_svc_checks.cc")
382 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
383 add_test("${TEST_NAME}" "${TEST_NAME}")
384
385 # Test calling acknowledge_host_problem.
386 set(TEST_NAME "modules_external_command_acknowledge_host_problem")
387 add_executable("${TEST_NAME}"
388 "${TEST_DIR}/acknowledge_host_problem.cc")
389 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
390 add_test("${TEST_NAME}" "${TEST_NAME}")
391
392 # Test calling remove_host_acknowledgement.
393 set(TEST_NAME "modules_external_command_remove_host_acknowledgement")
394 add_executable("${TEST_NAME}"
395 "${TEST_DIR}/remove_host_acknowledgement.cc")
396 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
397 add_test("${TEST_NAME}" "${TEST_NAME}")
398
399 # Test calling enable_host_event_handler.
400 set(TEST_NAME "modules_external_command_enable_host_event_handler")
401 add_executable("${TEST_NAME}"
402 "${TEST_DIR}/enable_host_event_handler.cc")
403 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
404 add_test("${TEST_NAME}" "${TEST_NAME}")
405
406 # Test calling disable_host_event_handler.
407 set(TEST_NAME "modules_external_command_disable_host_event_handler")
408 add_executable("${TEST_NAME}"
409 "${TEST_DIR}/disable_host_event_handler.cc")
410 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
411 add_test("${TEST_NAME}" "${TEST_NAME}")
412
413 # Test calling enable_host_check.
414 set(TEST_NAME "modules_external_command_enable_host_check")
415 add_executable("${TEST_NAME}"
416 "${TEST_DIR}/enable_host_check.cc")
417 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
418 add_test("${TEST_NAME}" "${TEST_NAME}")
419
420 # Test calling disable_host_check.
421 set(TEST_NAME "modules_external_command_disable_host_check")
422 add_executable("${TEST_NAME}"
423 "${TEST_DIR}/disable_host_check.cc")
424 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
425 add_test("${TEST_NAME}" "${TEST_NAME}")
426
427 # Test calling schedule_host_check.
428 set(TEST_NAME "modules_external_command_schedule_host_check")
429 add_executable("${TEST_NAME}"
430 "${TEST_DIR}/schedule_host_check.cc")
431 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
432 add_test("${TEST_NAME}" "${TEST_NAME}")
433
434 # Test calling schedule_forced_host_check.
435 set(TEST_NAME "modules_external_command_schedule_forced_host_check")
436 add_executable("${TEST_NAME}"
437 "${TEST_DIR}/schedule_forced_host_check.cc")
438 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
439 add_test("${TEST_NAME}" "${TEST_NAME}")
440
441 # Test calling schedule_host_downtime.
442 set(TEST_NAME "modules_external_command_schedule_host_downtime")
443 add_executable("${TEST_NAME}"
444 "${TEST_DIR}/schedule_host_downtime.cc")
445 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
446 add_test("${TEST_NAME}" "${TEST_NAME}")
447
448 # Test calling schedule_host_svc_downtime.
449 set(TEST_NAME "modules_external_command_schedule_host_svc_downtime")
450 add_executable("${TEST_NAME}"
451 "${TEST_DIR}/schedule_host_svc_downtime.cc")
452 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
453 add_test("${TEST_NAME}" "${TEST_NAME}")
454
455 # Test calling del_host_downtime.
456 set(TEST_NAME "modules_external_command_del_host_downtime")
457 add_executable("${TEST_NAME}"
458 "${TEST_DIR}/del_host_downtime.cc")
459 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
460 add_test("${TEST_NAME}" "${TEST_NAME}")
461
462 # Test calling del_downtime_by_host_name.
463 set(TEST_NAME "modules_external_command_del_downtime_by_host_name")
464 add_executable("${TEST_NAME}"
465 "${TEST_DIR}/del_downtime_by_host_name.cc")
466 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
467 add_test("${TEST_NAME}" "${TEST_NAME}")
468
469 # Test calling del_downtime_by_hostgroup_name.
470 set(TEST_NAME "modules_external_command_del_downtime_by_hostgroup_name")
471 add_executable("${TEST_NAME}"
472 "${TEST_DIR}/del_downtime_by_hostgroup_name.cc")
473 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
474 add_test("${TEST_NAME}" "${TEST_NAME}")
475
476 # Test calling del_downtime_by_start_time_comment.
477 set(TEST_NAME "modules_external_command_del_downtime_by_start_time_comment")
478 add_executable("${TEST_NAME}"
479 "${TEST_DIR}/del_downtime_by_start_time_comment.cc")
480 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
481 add_test("${TEST_NAME}" "${TEST_NAME}")
482
483 # Test calling enable_host_flap_detection.
484 set(TEST_NAME "modules_external_command_enable_host_flap_detection")
485 add_executable("${TEST_NAME}"
486 "${TEST_DIR}/enable_host_flap_detection.cc")
487 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
488 add_test("${TEST_NAME}" "${TEST_NAME}")
489
490 # Test calling disable_host_flap_detection.
491 set(TEST_NAME "modules_external_command_disable_host_flap_detection")
492 add_executable("${TEST_NAME}"
493 "${TEST_DIR}/disable_host_flap_detection.cc")
494 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
495 add_test("${TEST_NAME}" "${TEST_NAME}")
496
497 # Test calling start_obsessing_over_host.
498 set(TEST_NAME "modules_external_command_start_obsessing_over_host")
499 add_executable("${TEST_NAME}"
500 "${TEST_DIR}/start_obsessing_over_host.cc")
501 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
502 add_test("${TEST_NAME}" "${TEST_NAME}")
503
504 # Test calling stop_obsessing_over_host.
505 set(TEST_NAME "modules_external_command_stop_obsessing_over_host")
506 add_executable("${TEST_NAME}"
507 "${TEST_DIR}/stop_obsessing_over_host.cc")
508 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
509 add_test("${TEST_NAME}" "${TEST_NAME}")
510
511 # Test calling change_host_event_handler.
512 set(TEST_NAME "modules_external_command_change_host_event_handler")
513 add_executable("${TEST_NAME}"
514 "${TEST_DIR}/change_host_event_handler.cc")
515 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
516 add_test("${TEST_NAME}" "${TEST_NAME}")
517
518 # Test calling change_host_check_command.
519 set(TEST_NAME "modules_external_command_change_host_check_command")
520 add_executable("${TEST_NAME}"
521 "${TEST_DIR}/change_host_check_command.cc")
522 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
523 add_test("${TEST_NAME}" "${TEST_NAME}")
524
525 # Test calling change_normal_host_check_interval.
526 set(TEST_NAME "modules_external_command_change_normal_host_check_interval")
527 add_executable("${TEST_NAME}"
528 "${TEST_DIR}/change_normal_host_check_interval.cc")
529 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
530 add_test("${TEST_NAME}" "${TEST_NAME}")
531
532 # Test calling change_retry_host_check_interval.
533 set(TEST_NAME "modules_external_command_change_retry_host_check_interval")
534 add_executable("${TEST_NAME}"
535 "${TEST_DIR}/change_retry_host_check_interval.cc")
536 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
537 add_test("${TEST_NAME}" "${TEST_NAME}")
538
539 # Test calling change_max_host_check_attempts.
540 set(TEST_NAME "modules_external_command_change_max_host_check_attempts")
541 add_executable("${TEST_NAME}"
542 "${TEST_DIR}/change_max_host_check_attempts.cc")
543 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
544 add_test("${TEST_NAME}" "${TEST_NAME}")
545
546 # Test calling schedule_and_propagate_triggered_host_downtime.
547 set(TEST_NAME "modules_external_command_schedule_and_propagate_triggered_host_downtime")
548 add_executable("${TEST_NAME}"
549 "${TEST_DIR}/schedule_and_propagate_triggered_host_downtime.cc")
550 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
551 add_test("${TEST_NAME}" "${TEST_NAME}")
552
553 # Test calling schedule_and_propagate_host_downtime.
554 set(TEST_NAME "modules_external_command_schedule_and_propagate_host_downtime")
555 add_executable("${TEST_NAME}"
556 "${TEST_DIR}/schedule_and_propagate_host_downtime.cc")
557 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
558 add_test("${TEST_NAME}" "${TEST_NAME}")
559
560 # Test calling set_host_notification_number.
561 set(TEST_NAME "modules_external_command_set_host_notification_number")
562 add_executable("${TEST_NAME}"
563 "${TEST_DIR}/set_host_notification_number.cc")
564 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
565 add_test("${TEST_NAME}" "${TEST_NAME}")
566
567 # Test calling change_host_check_timeperiod.
568 set(TEST_NAME "modules_external_command_change_host_check_timeperiod")
569 add_executable("${TEST_NAME}"
570 "${TEST_DIR}/change_host_check_timeperiod.cc")
571 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
572 add_test("${TEST_NAME}" "${TEST_NAME}")
573
574 # Test calling change_custom_host_var.
575 set(TEST_NAME "modules_external_command_change_custom_host_var")
576 add_executable("${TEST_NAME}"
577 "${TEST_DIR}/change_custom_host_var.cc")
578 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
579 add_test("${TEST_NAME}" "${TEST_NAME}")
580
581 # Test calling send_custom_host_notification.
582 set(TEST_NAME "modules_external_command_send_custom_host_notification")
583 add_executable("${TEST_NAME}"
584 "${TEST_DIR}/send_custom_host_notification.cc")
585 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
586 add_test("${TEST_NAME}" "${TEST_NAME}")
587
588 # Test calling change_host_notification_timeperiod.
589 set(TEST_NAME "modules_external_command_change_host_notification_timeperiod")
590 add_executable("${TEST_NAME}"
591 "${TEST_DIR}/change_host_notification_timeperiod.cc")
592 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
593 add_test("${TEST_NAME}" "${TEST_NAME}")
594
595 # Test calling change_host_modattr.
596 set(TEST_NAME "modules_external_command_change_host_modattr")
597 add_executable("${TEST_NAME}"
598 "${TEST_DIR}/change_host_modattr.cc")
599 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
600 add_test("${TEST_NAME}" "${TEST_NAME}")
601
602 # Test calling enable_hostgroup_host_notifications.
603 set(TEST_NAME "modules_external_command_enable_hostgroup_host_notifications")
604 add_executable("${TEST_NAME}"
605 "${TEST_DIR}/enable_hostgroup_host_notifications.cc")
606 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
607 add_test("${TEST_NAME}" "${TEST_NAME}")
608
609 # Test calling disable_hostgroup_host_notifications.
610 set(TEST_NAME "modules_external_command_disable_hostgroup_host_notifications")
611 add_executable("${TEST_NAME}"
612 "${TEST_DIR}/disable_hostgroup_host_notifications.cc")
613 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
614 add_test("${TEST_NAME}" "${TEST_NAME}")
615
616 # Test calling enable_hostgroup_svc_notifications.
617 set(TEST_NAME "modules_external_command_enable_hostgroup_svc_notifications")
618 add_executable("${TEST_NAME}"
619 "${TEST_DIR}/enable_hostgroup_svc_notifications.cc")
620 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
621 add_test("${TEST_NAME}" "${TEST_NAME}")
622
623 # Test calling disable_hostgroup_svc_notifications.
624 set(TEST_NAME "modules_external_command_disable_hostgroup_svc_notifications")
625 add_executable("${TEST_NAME}"
626 "${TEST_DIR}/disable_hostgroup_svc_notifications.cc")
627 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
628 add_test("${TEST_NAME}" "${TEST_NAME}")
629
630 # Test calling enable_hostgroup_host_checks.
631 set(TEST_NAME "modules_external_command_enable_hostgroup_host_checks")
632 add_executable("${TEST_NAME}"
633 "${TEST_DIR}/enable_hostgroup_host_checks.cc")
634 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
635 add_test("${TEST_NAME}" "${TEST_NAME}")
636
637 # Test calling disable_hostgroup_host_checks.
638 set(TEST_NAME "modules_external_command_disable_hostgroup_host_checks")
639 add_executable("${TEST_NAME}"
640 "${TEST_DIR}/disable_hostgroup_host_checks.cc")
641 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
642 add_test("${TEST_NAME}" "${TEST_NAME}")
643
644 # Test calling enable_hostgroup_passive_host_checks.
645 set(TEST_NAME "modules_external_command_enable_hostgroup_passive_host_checks")
646 add_executable("${TEST_NAME}"
647 "${TEST_DIR}/enable_hostgroup_passive_host_checks.cc")
648 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
649 add_test("${TEST_NAME}" "${TEST_NAME}")
650
651 # Test calling disable_hostgroup_passive_host_checks.
652 set(TEST_NAME "modules_external_command_disable_hostgroup_passive_host_checks")
653 add_executable("${TEST_NAME}"
654 "${TEST_DIR}/disable_hostgroup_passive_host_checks.cc")
655 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
656 add_test("${TEST_NAME}" "${TEST_NAME}")
657
658 # Test calling enable_hostgroup_svc_checks.
659 set(TEST_NAME "modules_external_command_enable_hostgroup_svc_checks")
660 add_executable("${TEST_NAME}"
661 "${TEST_DIR}/enable_hostgroup_svc_checks.cc")
662 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
663 add_test("${TEST_NAME}" "${TEST_NAME}")
664
665 # Test calling disable_hostgroup_svc_checks.
666 set(TEST_NAME "modules_external_command_disable_hostgroup_svc_checks")
667 add_executable("${TEST_NAME}"
668 "${TEST_DIR}/disable_hostgroup_svc_checks.cc")
669 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
670 add_test("${TEST_NAME}" "${TEST_NAME}")
671
672 # Test calling enable_hostgroup_passive_svc_checks.
673 set(TEST_NAME "modules_external_command_enable_hostgroup_passive_svc_checks")
674 add_executable("${TEST_NAME}"
675 "${TEST_DIR}/enable_hostgroup_passive_svc_checks.cc")
676 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
677 add_test("${TEST_NAME}" "${TEST_NAME}")
678
679 # Test calling disable_hostgroup_passive_svc_checks.
680 set(TEST_NAME "modules_external_command_disable_hostgroup_passive_svc_checks")
681 add_executable("${TEST_NAME}"
682 "${TEST_DIR}/disable_hostgroup_passive_svc_checks.cc")
683 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
684 add_test("${TEST_NAME}" "${TEST_NAME}")
685
686 # Test calling schedule_hostgroup_host_downtime.
687 set(TEST_NAME "modules_external_command_schedule_hostgroup_host_downtime")
688 add_executable("${TEST_NAME}"
689 "${TEST_DIR}/schedule_hostgroup_host_downtime.cc")
690 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
691 add_test("${TEST_NAME}" "${TEST_NAME}")
692
693 # Test calling schedule_hostgroup_svc_downtime.
694 set(TEST_NAME "modules_external_command_schedule_hostgroup_svc_downtime")
695 add_executable("${TEST_NAME}"
696 "${TEST_DIR}/schedule_hostgroup_svc_downtime.cc")
697 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
698 add_test("${TEST_NAME}" "${TEST_NAME}")
699
700 # Test calling add_svc_comment.
701 set(TEST_NAME "modules_external_command_add_svc_comment")
702 add_executable("${TEST_NAME}"
703 "${TEST_DIR}/add_svc_comment.cc")
704 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
705 add_test("${TEST_NAME}" "${TEST_NAME}")
706
707 # Test calling del_svc_comment.
708 set(TEST_NAME "modules_external_command_del_svc_comment")
709 add_executable("${TEST_NAME}"
710 "${TEST_DIR}/del_svc_comment.cc")
711 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
712 add_test("${TEST_NAME}" "${TEST_NAME}")
713
714 # Test calling del_all_svc_comments.
715 set(TEST_NAME "modules_external_command_del_all_svc_comments")
716 add_executable("${TEST_NAME}"
717 "${TEST_DIR}/del_all_svc_comments.cc")
718 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
719 add_test("${TEST_NAME}" "${TEST_NAME}")
720
721 # Test calling schedule_svc_check.
722 set(TEST_NAME "modules_external_command_schedule_svc_check")
723 add_executable("${TEST_NAME}"
724 "${TEST_DIR}/schedule_svc_check.cc")
725 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
726 add_test("${TEST_NAME}" "${TEST_NAME}")
727
728 # Test calling schedule_forced_svc_check.
729 set(TEST_NAME "modules_external_command_schedule_forced_svc_check")
730 add_executable("${TEST_NAME}"
731 "${TEST_DIR}/schedule_forced_svc_check.cc")
732 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
733 add_test("${TEST_NAME}" "${TEST_NAME}")
734
735 # Test calling enable_svc_check.
736 set(TEST_NAME "modules_external_command_enable_svc_check")
737 add_executable("${TEST_NAME}"
738 "${TEST_DIR}/enable_svc_check.cc")
739 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
740 add_test("${TEST_NAME}" "${TEST_NAME}")
741
742 # Test calling disable_svc_check.
743 set(TEST_NAME "modules_external_command_disable_svc_check")
744 add_executable("${TEST_NAME}"
745 "${TEST_DIR}/disable_svc_check.cc")
746 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
747 add_test("${TEST_NAME}" "${TEST_NAME}")
748
749 # Test calling enable_passive_svc_checks.
750 set(TEST_NAME "modules_external_command_enable_passive_svc_checks")
751 add_executable("${TEST_NAME}"
752 "${TEST_DIR}/enable_passive_svc_checks.cc")
753 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
754 add_test("${TEST_NAME}" "${TEST_NAME}")
755
756 # Test calling disable_passive_svc_checks.
757 set(TEST_NAME "modules_external_command_disable_passive_svc_checks")
758 add_executable("${TEST_NAME}"
759 "${TEST_DIR}/disable_passive_svc_checks.cc")
760 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
761 add_test("${TEST_NAME}" "${TEST_NAME}")
762
763 # Test calling delay_svc_notification.
764 set(TEST_NAME "modules_external_command_delay_svc_notification")
765 add_executable("${TEST_NAME}"
766 "${TEST_DIR}/delay_svc_notification.cc")
767 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
768 add_test("${TEST_NAME}" "${TEST_NAME}")
769
770 # Test calling enable_svc_notifications.
771 set(TEST_NAME "modules_external_command_enable_svc_notifications")
772 add_executable("${TEST_NAME}"
773 "${TEST_DIR}/enable_svc_notifications.cc")
774 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
775 add_test("${TEST_NAME}" "${TEST_NAME}")
776
777 # Test calling disable_svc_notifications.
778 set(TEST_NAME "modules_external_command_disable_svc_notifications")
779 add_executable("${TEST_NAME}"
780 "${TEST_DIR}/disable_svc_notifications.cc")
781 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
782 add_test("${TEST_NAME}" "${TEST_NAME}")
783
784 # Test calling process_service_check_result.
785 set(TEST_NAME "modules_external_command_process_service_check_result")
786 add_executable("${TEST_NAME}"
787 "${TEST_DIR}/process_service_check_result.cc")
788 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
789 add_test("${TEST_NAME}" "${TEST_NAME}")
790
791 # Test calling process_host_check_result.
792 set(TEST_NAME "modules_external_command_process_host_check_result")
793 add_executable("${TEST_NAME}"
794 "${TEST_DIR}/process_host_check_result.cc")
795 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
796 add_test("${TEST_NAME}" "${TEST_NAME}")
797
798 # Test calling enable_svc_event_handler.
799 set(TEST_NAME "modules_external_command_enable_svc_event_handler")
800 add_executable("${TEST_NAME}"
801 "${TEST_DIR}/enable_svc_event_handler.cc")
802 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
803 add_test("${TEST_NAME}" "${TEST_NAME}")
804
805 # Test calling disable_svc_event_handler.
806 set(TEST_NAME "modules_external_command_disable_svc_event_handler")
807 add_executable("${TEST_NAME}"
808 "${TEST_DIR}/disable_svc_event_handler.cc")
809 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
810 add_test("${TEST_NAME}" "${TEST_NAME}")
811
812 # Test calling enable_svc_flap_detection.
813 set(TEST_NAME "modules_external_command_enable_svc_flap_detection")
814 add_executable("${TEST_NAME}"
815 "${TEST_DIR}/enable_svc_flap_detection.cc")
816 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
817 add_test("${TEST_NAME}" "${TEST_NAME}")
818
819 # Test calling disable_svc_flap_detection.
820 set(TEST_NAME "modules_external_command_disable_svc_flap_detection")
821 add_executable("${TEST_NAME}"
822 "${TEST_DIR}/disable_svc_flap_detection.cc")
823 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
824 add_test("${TEST_NAME}" "${TEST_NAME}")
825
826 # Test calling schedule_svc_downtime.
827 set(TEST_NAME "modules_external_command_schedule_svc_downtime")
828 add_executable("${TEST_NAME}"
829 "${TEST_DIR}/schedule_svc_downtime.cc")
830 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
831 add_test("${TEST_NAME}" "${TEST_NAME}")
832
833 # Test calling del_svc_downtime.
834 set(TEST_NAME "modules_external_command_del_svc_downtime")
835 add_executable("${TEST_NAME}"
836 "${TEST_DIR}/del_svc_downtime.cc")
837 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
838 add_test("${TEST_NAME}" "${TEST_NAME}")
839
840 # Test calling acknowledge_svc_problem.
841 set(TEST_NAME "modules_external_command_acknowledge_svc_problem")
842 add_executable("${TEST_NAME}"
843 "${TEST_DIR}/acknowledge_svc_problem.cc")
844 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
845 add_test("${TEST_NAME}" "${TEST_NAME}")
846
847 # Test calling remove_svc_acknowledgement.
848 set(TEST_NAME "modules_external_command_remove_svc_acknowledgement")
849 add_executable("${TEST_NAME}"
850 "${TEST_DIR}/remove_svc_acknowledgement.cc")
851 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
852 add_test("${TEST_NAME}" "${TEST_NAME}")
853
854 # Test calling start_obsessing_over_svc.
855 set(TEST_NAME "modules_external_command_start_obsessing_over_svc")
856 add_executable("${TEST_NAME}"
857 "${TEST_DIR}/start_obsessing_over_svc.cc")
858 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
859 add_test("${TEST_NAME}" "${TEST_NAME}")
860
861 # Test calling stop_obsessing_over_svc.
862 set(TEST_NAME "modules_external_command_stop_obsessing_over_svc")
863 add_executable("${TEST_NAME}"
864 "${TEST_DIR}/stop_obsessing_over_svc.cc")
865 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
866 add_test("${TEST_NAME}" "${TEST_NAME}")
867
868 # Test calling change_svc_event_handler.
869 set(TEST_NAME "modules_external_command_change_svc_event_handler")
870 add_executable("${TEST_NAME}"
871 "${TEST_DIR}/change_svc_event_handler.cc")
872 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
873 add_test("${TEST_NAME}" "${TEST_NAME}")
874
875 # Test calling change_svc_check_command.
876 set(TEST_NAME "modules_external_command_change_svc_check_command")
877 add_executable("${TEST_NAME}"
878 "${TEST_DIR}/change_svc_check_command.cc")
879 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
880 add_test("${TEST_NAME}" "${TEST_NAME}")
881
882 # Test calling change_normal_svc_check_interval.
883 set(TEST_NAME "modules_external_command_change_normal_svc_check_interval")
884 add_executable("${TEST_NAME}"
885 "${TEST_DIR}/change_normal_svc_check_interval.cc")
886 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
887 add_test("${TEST_NAME}" "${TEST_NAME}")
888
889 # Test calling change_retry_svc_check_interval.
890 set(TEST_NAME "modules_external_command_change_retry_svc_check_interval")
891 add_executable("${TEST_NAME}"
892 "${TEST_DIR}/change_retry_svc_check_interval.cc")
893 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
894 add_test("${TEST_NAME}" "${TEST_NAME}")
895
896 # Test calling change_max_svc_check_attempts.
897 set(TEST_NAME "modules_external_command_change_max_svc_check_attempts")
898 add_executable("${TEST_NAME}"
899 "${TEST_DIR}/change_max_svc_check_attempts.cc")
900 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
901 add_test("${TEST_NAME}" "${TEST_NAME}")
902
903 # Test calling set_svc_notification_number.
904 set(TEST_NAME "modules_external_command_set_svc_notification_number")
905 add_executable("${TEST_NAME}"
906 "${TEST_DIR}/set_svc_notification_number.cc")
907 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
908 add_test("${TEST_NAME}" "${TEST_NAME}")
909
910 # Test calling change_svc_check_timeperiod.
911 set(TEST_NAME "modules_external_command_change_svc_check_timeperiod")
912 add_executable("${TEST_NAME}"
913 "${TEST_DIR}/change_svc_check_timeperiod.cc")
914 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
915 add_test("${TEST_NAME}" "${TEST_NAME}")
916
917 # Test calling change_custom_svc_var.
918 set(TEST_NAME "modules_external_command_change_custom_svc_var")
919 add_executable("${TEST_NAME}"
920 "${TEST_DIR}/change_custom_svc_var.cc")
921 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
922 add_test("${TEST_NAME}" "${TEST_NAME}")
923
924 # Test calling change_custom_contact_var.
925 set(TEST_NAME "modules_external_command_change_custom_contact_var")
926 add_executable("${TEST_NAME}"
927 "${TEST_DIR}/change_custom_contact_var.cc")
928 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
929 add_test("${TEST_NAME}" "${TEST_NAME}")
930
931 # Test calling send_custom_svc_notification.
932 set(TEST_NAME "modules_external_command_send_custom_svc_notification")
933 add_executable("${TEST_NAME}"
934 "${TEST_DIR}/send_custom_svc_notification.cc")
935 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
936 add_test("${TEST_NAME}" "${TEST_NAME}")
937
938 # Test calling change_svc_notification_timeperiod.
939 set(TEST_NAME "modules_external_command_change_svc_notification_timeperiod")
940 add_executable("${TEST_NAME}"
941 "${TEST_DIR}/change_svc_notification_timeperiod.cc")
942 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
943 add_test("${TEST_NAME}" "${TEST_NAME}")
944
945 # Test calling change_svc_modattr.
946 set(TEST_NAME "modules_external_command_change_svc_modattr")
947 add_executable("${TEST_NAME}"
948 "${TEST_DIR}/change_svc_modattr.cc")
949 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
950 add_test("${TEST_NAME}" "${TEST_NAME}")
951
952 # Test calling enable_servicegroup_host_notifications.
953 set(TEST_NAME "modules_external_command_enable_servicegroup_host_notifications")
954 add_executable("${TEST_NAME}"
955 "${TEST_DIR}/enable_servicegroup_host_notifications.cc")
956 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
957 add_test("${TEST_NAME}" "${TEST_NAME}")
958
959 # Test calling disable_servicegroup_host_notifications.
960 set(TEST_NAME "modules_external_command_disable_servicegroup_host_notifications")
961 add_executable("${TEST_NAME}"
962 "${TEST_DIR}/disable_servicegroup_host_notifications.cc")
963 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
964 add_test("${TEST_NAME}" "${TEST_NAME}")
965
966 # Test calling enable_servicegroup_svc_notifications.
967 set(TEST_NAME "modules_external_command_enable_servicegroup_svc_notifications")
968 add_executable("${TEST_NAME}"
969 "${TEST_DIR}/enable_servicegroup_svc_notifications.cc")
970 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
971 add_test("${TEST_NAME}" "${TEST_NAME}")
972
973 # Test calling disable_servicegroup_svc_notifications.
974 set(TEST_NAME "modules_external_command_disable_servicegroup_svc_notifications")
975 add_executable("${TEST_NAME}"
976 "${TEST_DIR}/disable_servicegroup_svc_notifications.cc")
977 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
978 add_test("${TEST_NAME}" "${TEST_NAME}")
979
980 # Test calling enable_servicegroup_host_checks.
981 set(TEST_NAME "modules_external_command_enable_servicegroup_host_checks")
982 add_executable("${TEST_NAME}"
983 "${TEST_DIR}/enable_servicegroup_host_checks.cc")
984 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
985 add_test("${TEST_NAME}" "${TEST_NAME}")
986
987 # Test calling disable_servicegroup_host_checks.
988 set(TEST_NAME "modules_external_command_disable_servicegroup_host_checks")
989 add_executable("${TEST_NAME}"
990 "${TEST_DIR}/disable_servicegroup_host_checks.cc")
991 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
992 add_test("${TEST_NAME}" "${TEST_NAME}")
993
994 # Test calling enable_servicegroup_passive_host_checks.
995 set(TEST_NAME "modules_external_command_enable_servicegroup_passive_host_checks")
996 add_executable("${TEST_NAME}"
997 "${TEST_DIR}/enable_servicegroup_passive_host_checks.cc")
998 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
999 add_test("${TEST_NAME}" "${TEST_NAME}")
1000
1001 # Test calling disable_servicegroup_passive_host_checks.
1002 set(TEST_NAME "modules_external_command_disable_servicegroup_passive_host_checks")
1003 add_executable("${TEST_NAME}"
1004 "${TEST_DIR}/disable_servicegroup_passive_host_checks.cc")
1005 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1006 add_test("${TEST_NAME}" "${TEST_NAME}")
1007
1008 # Test calling enable_servicegroup_svc_checks.
1009 set(TEST_NAME "modules_external_command_enable_servicegroup_svc_checks")
1010 add_executable("${TEST_NAME}"
1011 "${TEST_DIR}/enable_servicegroup_svc_checks.cc")
1012 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1013 add_test("${TEST_NAME}" "${TEST_NAME}")
1014
1015 # Test calling disable_servicegroup_svc_checks.
1016 set(TEST_NAME "modules_external_command_disable_servicegroup_svc_checks")
1017 add_executable("${TEST_NAME}"
1018 "${TEST_DIR}/disable_servicegroup_svc_checks.cc")
1019 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1020 add_test("${TEST_NAME}" "${TEST_NAME}")
1021
1022 # Test calling enable_servicegroup_passive_svc_checks.
1023 set(TEST_NAME "modules_external_command_enable_servicegroup_passive_svc_checks")
1024 add_executable("${TEST_NAME}"
1025 "${TEST_DIR}/enable_servicegroup_passive_svc_checks.cc")
1026 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1027 add_test("${TEST_NAME}" "${TEST_NAME}")
1028
1029 # Test calling disable_servicegroup_passive_svc_checks.
1030 set(TEST_NAME "modules_external_command_disable_servicegroup_passive_svc_checks")
1031 add_executable("${TEST_NAME}"
1032 "${TEST_DIR}/disable_servicegroup_passive_svc_checks.cc")
1033 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1034 add_test("${TEST_NAME}" "${TEST_NAME}")
1035
1036 # Test calling schedule_servicegroup_host_downtime.
1037 set(TEST_NAME "modules_external_command_schedule_servicegroup_host_downtime")
1038 add_executable("${TEST_NAME}"
1039 "${TEST_DIR}/schedule_servicegroup_host_downtime.cc")
1040 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1041 add_test("${TEST_NAME}" "${TEST_NAME}")
1042
1043 # Test calling schedule_servicegroup_svc_downtime.
1044 set(TEST_NAME "modules_external_command_schedule_servicegroup_svc_downtime")
1045 add_executable("${TEST_NAME}"
1046 "${TEST_DIR}/schedule_servicegroup_svc_downtime.cc")
1047 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1048 add_test("${TEST_NAME}" "${TEST_NAME}")
1049
1050 # Test calling enable_contact_host_notifications.
1051 set(TEST_NAME "modules_external_command_enable_contact_host_notifications")
1052 add_executable("${TEST_NAME}"
1053 "${TEST_DIR}/enable_contact_host_notifications.cc")
1054 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1055 add_test("${TEST_NAME}" "${TEST_NAME}")
1056
1057 # Test calling disable_contact_host_notifications.
1058 set(TEST_NAME "modules_external_command_disable_contact_host_notifications")
1059 add_executable("${TEST_NAME}"
1060 "${TEST_DIR}/disable_contact_host_notifications.cc")
1061 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1062 add_test("${TEST_NAME}" "${TEST_NAME}")
1063
1064 # Test calling enable_contact_svc_notifications.
1065 set(TEST_NAME "modules_external_command_enable_contact_svc_notifications")
1066 add_executable("${TEST_NAME}"
1067 "${TEST_DIR}/enable_contact_svc_notifications.cc")
1068 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1069 add_test("${TEST_NAME}" "${TEST_NAME}")
1070
1071 # Test calling disable_contact_svc_notifications.
1072 set(TEST_NAME "modules_external_command_disable_contact_svc_notifications")
1073 add_executable("${TEST_NAME}"
1074 "${TEST_DIR}/disable_contact_svc_notifications.cc")
1075 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1076 add_test("${TEST_NAME}" "${TEST_NAME}")
1077
1078 # Test calling change_contact_host_notification_timeperiod.
1079 set(TEST_NAME "modules_external_command_change_contact_host_notification_timeperiod")
1080 add_executable("${TEST_NAME}"
1081 "${TEST_DIR}/change_contact_host_notification_timeperiod.cc")
1082 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1083 add_test("${TEST_NAME}" "${TEST_NAME}")
1084
1085 # Test calling change_contact_svc_notification_timeperiod.
1086 set(TEST_NAME "modules_external_command_change_contact_svc_notification_timeperiod")
1087 add_executable("${TEST_NAME}"
1088 "${TEST_DIR}/change_contact_svc_notification_timeperiod.cc")
1089 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1090 add_test("${TEST_NAME}" "${TEST_NAME}")
1091
1092 # Test calling change_contact_modattr.
1093 set(TEST_NAME "modules_external_command_change_contact_modattr")
1094 add_executable("${TEST_NAME}"
1095 "${TEST_DIR}/change_contact_modattr.cc")
1096 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1097 add_test("${TEST_NAME}" "${TEST_NAME}")
1098
1099 # Test calling change_contact_modhattr.
1100 set(TEST_NAME "modules_external_command_change_contact_modhattr")
1101 add_executable("${TEST_NAME}"
1102 "${TEST_DIR}/change_contact_modhattr.cc")
1103 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1104 add_test("${TEST_NAME}" "${TEST_NAME}")
1105
1106 # Test calling change_contact_modsattr.
1107 set(TEST_NAME "modules_external_command_change_contact_modsattr")
1108 add_executable("${TEST_NAME}"
1109 "${TEST_DIR}/change_contact_modsattr.cc")
1110 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1111 add_test("${TEST_NAME}" "${TEST_NAME}")
1112
1113 # Test calling enable_contactgroup_host_notifications.
1114 set(TEST_NAME "modules_external_command_enable_contactgroup_host_notifications")
1115 add_executable("${TEST_NAME}"
1116 "${TEST_DIR}/enable_contactgroup_host_notifications.cc")
1117 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1118 add_test("${TEST_NAME}" "${TEST_NAME}")
1119
1120 # Test calling disable_contactgroup_host_notifications.
1121 set(TEST_NAME "modules_external_command_disable_contactgroup_host_notifications")
1122 add_executable("${TEST_NAME}"
1123 "${TEST_DIR}/disable_contactgroup_host_notifications.cc")
1124 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1125 add_test("${TEST_NAME}" "${TEST_NAME}")
1126
1127 # Test calling enable_contactgroup_svc_notifications.
1128 set(TEST_NAME "modules_external_command_enable_contactgroup_svc_notifications")
1129 add_executable("${TEST_NAME}"
1130 "${TEST_DIR}/enable_contactgroup_svc_notifications.cc")
1131 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1132 add_test("${TEST_NAME}" "${TEST_NAME}")
1133
1134 # Test calling disable_contactgroup_svc_notifications.
1135 set(TEST_NAME "modules_external_command_disable_contactgroup_svc_notifications")
1136 add_executable("${TEST_NAME}"
1137 "${TEST_DIR}/disable_contactgroup_svc_notifications.cc")
1138 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1139 add_test("${TEST_NAME}" "${TEST_NAME}")
1140
1141 # Test calling process_file.
1142 set(TEST_NAME "modules_external_command_process_file")
1143 add_executable("${TEST_NAME}"
1144 "${TEST_DIR}/process_file.cc")
1145 target_link_libraries("${TEST_NAME}" ${QT_LIBRARIES} "cce_core" "external_cmd")
1146 add_test("${TEST_NAME}" "${TEST_NAME}")
1147