aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_plugin_transport_http.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-05-07 12:15:13 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-05-07 12:15:13 +0000
commitcadcd8f0f6b3f7b9d22c8a39bf860419a75544d4 (patch)
treee04d4d665358787ec049236b5c98da9801d7a262 /src/transport/test_plugin_transport_http.c
parenta7f34525fa63e800e59dfcfd129da0b3c670c947 (diff)
downloadgnunet-cadcd8f0f6b3f7b9d22c8a39bf860419a75544d4.tar.gz
gnunet-cadcd8f0f6b3f7b9d22c8a39bf860419a75544d4.zip
Diffstat (limited to 'src/transport/test_plugin_transport_http.c')
-rw-r--r--src/transport/test_plugin_transport_http.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/transport/test_plugin_transport_http.c b/src/transport/test_plugin_transport_http.c
index 0ce1766c9..35666ece1 100644
--- a/src/transport/test_plugin_transport_http.c
+++ b/src/transport/test_plugin_transport_http.c
@@ -110,6 +110,8 @@ static unsigned int timeout_count;
110 */ 110 */
111static int fail; 111static int fail;
112 112
113pid_t pid;
114
113/** 115/**
114 * Initialize Environment for this plugin 116 * Initialize Environment for this plugin
115 */ 117 */
@@ -242,7 +244,6 @@ main (int argc, char *const *argv)
242 static struct GNUNET_GETOPT_CommandLineOption options[] = { 244 static struct GNUNET_GETOPT_CommandLineOption options[] = {
243 GNUNET_GETOPT_OPTION_END 245 GNUNET_GETOPT_OPTION_END
244 }; 246 };
245 int ret;
246 char *const argv_prog[] = { 247 char *const argv_prog[] = {
247 "test_plugin_transport_http", 248 "test_plugin_transport_http",
248 "-c", 249 "-c",
@@ -262,14 +263,34 @@ main (int argc, char *const *argv)
262 "WARNING", 263 "WARNING",
263#endif 264#endif
264 NULL); 265 NULL);
265 ret = (GNUNET_OK == 266 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Starting statistics service\n");
267 pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-statistics",
268 "gnunet-service-statistics",
269 "-L", "DEBUG",
270 "-c", "test_plugin_transport_data_http.conf", NULL);
271
272 fail = GNUNET_YES;
273 if (pid==-1 )
274 {
275 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Failed to start statistics service\n");
276 return fail;
277 }
278
279 fail = (GNUNET_OK ==
266 GNUNET_PROGRAM_run (5, 280 GNUNET_PROGRAM_run (5,
267 argv_prog, 281 argv_prog,
268 "test_plugin_transport_http", 282 "test_plugin_transport_http",
269 "testcase", options, &run, NULL)) ? GNUNET_YES : 1; 283 "testcase", options, &run, NULL)) ? GNUNET_YES : 1;
270 GNUNET_DISK_directory_remove ("/tmp/test_plugin_transport_http"); 284 GNUNET_DISK_directory_remove ("/tmp/test_plugin_transport_http");
271 285
272 return GNUNET_NO; 286
287 if (0 != PLIBC_KILL (pid, SIGTERM))
288 {
289 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "Failed to kill statistics service");
290 fail = GNUNET_YES;
291 }
292 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Killed statistics service\n");
293 return fail;
273} 294}
274 295
275/* end of test_plugin_transport_http.c */ 296/* end of test_plugin_transport_http.c */