aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-03-23 19:58:15 +0000
committerChristian Grothoff <christian@grothoff.org>2013-03-23 19:58:15 +0000
commit856ce6820e23c219d58816dd12b5a99a59b9e667 (patch)
tree09d68ae186fd120e7304e53279746071b90db729 /src/core
parent9eba16d41ea69bb3a2ea990efe7739c174d99387 (diff)
downloadgnunet-856ce6820e23c219d58816dd12b5a99a59b9e667.tar.gz
gnunet-856ce6820e23c219d58816dd12b5a99a59b9e667.zip
-simplify
Diffstat (limited to 'src/core')
-rw-r--r--src/core/test_core_api.c21
-rw-r--r--src/core/test_core_api_reliability.c23
2 files changed, 13 insertions, 31 deletions
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c
index c7865dd11..9aaecea10 100644
--- a/src/core/test_core_api.c
+++ b/src/core/test_core_api.c
@@ -349,8 +349,8 @@ stop_arm (struct PeerContext *p)
349} 349}
350 350
351 351
352static int 352int
353check () 353main (int argc, char *argv[])
354{ 354{
355 char *const argv[] = { "test-core-api", 355 char *const argv[] = { "test-core-api",
356 "-c", 356 "-c",
@@ -361,26 +361,17 @@ check ()
361 GNUNET_GETOPT_OPTION_END 361 GNUNET_GETOPT_OPTION_END
362 }; 362 };
363 ok = 1; 363 ok = 1;
364 GNUNET_log_setup ("test-core-api",
365 "WARNING",
366 NULL);
364 GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, 367 GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
365 "test-core-api", "nohelp", options, &run, &ok); 368 "test-core-api", "nohelp", options, &run, &ok);
366 stop_arm (&p1); 369 stop_arm (&p1);
367 stop_arm (&p2); 370 stop_arm (&p2);
368 return ok;
369}
370
371int
372main (int argc, char *argv[])
373{
374 int ret;
375
376 GNUNET_log_setup ("test-core-api",
377 "WARNING",
378 NULL);
379 ret = check ();
380 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1"); 371 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1");
381 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2"); 372 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2");
382 373
383 return ret; 374 return ok;
384} 375}
385 376
386/* end of test_core_api.c */ 377/* end of test_core_api.c */
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c
index 47ade350c..5e9267096 100644
--- a/src/core/test_core_api_reliability.c
+++ b/src/core/test_core_api_reliability.c
@@ -461,8 +461,9 @@ stop_arm (struct PeerContext *p)
461 GNUNET_CONFIGURATION_destroy (p->cfg); 461 GNUNET_CONFIGURATION_destroy (p->cfg);
462} 462}
463 463
464static int 464
465check () 465int
466main (int argc, char *argv[])
466{ 467{
467 char *const argv[] = { "test-core-api-reliability", 468 char *const argv[] = { "test-core-api-reliability",
468 "-c", 469 "-c",
@@ -473,28 +474,18 @@ check ()
473 GNUNET_GETOPT_OPTION_END 474 GNUNET_GETOPT_OPTION_END
474 }; 475 };
475 ok = 1; 476 ok = 1;
477 GNUNET_log_setup ("test-core-api",
478 "WARNING",
479 NULL);
476 GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, 480 GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
477 "test-core-api-reliability", "nohelp", options, &run, 481 "test-core-api-reliability", "nohelp", options, &run,
478 &ok); 482 &ok);
479 stop_arm (&p1); 483 stop_arm (&p1);
480 stop_arm (&p2); 484 stop_arm (&p2);
481 return ok;
482}
483
484
485int
486main (int argc, char *argv[])
487{
488 int ret;
489
490 GNUNET_log_setup ("test-core-api",
491 "WARNING",
492 NULL);
493 ret = check ();
494 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1"); 485 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1");
495 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2"); 486 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2");
496 487
497 return ret; 488 return ok;
498} 489}
499 490
500/* end of test_core_api_reliability.c */ 491/* end of test_core_api_reliability.c */