diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-03-23 19:58:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-03-23 19:58:15 +0000 |
commit | 856ce6820e23c219d58816dd12b5a99a59b9e667 (patch) | |
tree | 09d68ae186fd120e7304e53279746071b90db729 /src/core/test_core_api.c | |
parent | 9eba16d41ea69bb3a2ea990efe7739c174d99387 (diff) | |
download | gnunet-856ce6820e23c219d58816dd12b5a99a59b9e667.tar.gz gnunet-856ce6820e23c219d58816dd12b5a99a59b9e667.zip |
-simplify
Diffstat (limited to 'src/core/test_core_api.c')
-rw-r--r-- | src/core/test_core_api.c | 21 |
1 files changed, 6 insertions, 15 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 | ||
352 | static int | 352 | int |
353 | check () | 353 | main (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 | |||
371 | int | ||
372 | main (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 */ |