diff options
Diffstat (limited to 'src/include/gnunet_testing_lib.h')
-rw-r--r-- | src/include/gnunet_testing_lib.h | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h index 664e20ac3..0d74de8c2 100644 --- a/src/include/gnunet_testing_lib.h +++ b/src/include/gnunet_testing_lib.h | |||
@@ -19,6 +19,9 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @addtogroup Testing | ||
23 | * @{ | ||
24 | * | ||
22 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
23 | * | 26 | * |
24 | * @file | 27 | * @file |
@@ -41,6 +44,7 @@ | |||
41 | #ifndef GNUNET_TESTING_LIB_H | 44 | #ifndef GNUNET_TESTING_LIB_H |
42 | #define GNUNET_TESTING_LIB_H | 45 | #define GNUNET_TESTING_LIB_H |
43 | 46 | ||
47 | |||
44 | #include "gnunet_util_lib.h" | 48 | #include "gnunet_util_lib.h" |
45 | #include "gnunet_statistics_service.h" | 49 | #include "gnunet_statistics_service.h" |
46 | #include "gnunet_arm_service.h" | 50 | #include "gnunet_arm_service.h" |
@@ -398,7 +402,7 @@ typedef void | |||
398 | * Starts a peer using the given configuration and then invokes the | 402 | * Starts a peer using the given configuration and then invokes the |
399 | * given callback. This function ALSO initializes the scheduler loop | 403 | * given callback. This function ALSO initializes the scheduler loop |
400 | * and should thus be called directly from "main". The testcase | 404 | * and should thus be called directly from "main". The testcase |
401 | * should self-terminate by invoking 'GNUNET_SCHEDULER_shutdown'. | 405 | * should self-terminate by invoking #GNUNET_SCHEDULER_shutdown(). |
402 | * | 406 | * |
403 | * @param testdir only the directory name without any path. This is used for | 407 | * @param testdir only the directory name without any path. This is used for |
404 | * all service homes; the directory will be created in a temporary | 408 | * all service homes; the directory will be created in a temporary |
@@ -406,7 +410,7 @@ typedef void | |||
406 | * @param cfgfilename name of the configuration file to use; | 410 | * @param cfgfilename name of the configuration file to use; |
407 | * use NULL to only run with defaults | 411 | * use NULL to only run with defaults |
408 | * @param tm main function of the testcase | 412 | * @param tm main function of the testcase |
409 | * @param tm_cls closure for 'tm' | 413 | * @param tm_cls closure for @a tm |
410 | * @return 0 on success, 1 on error | 414 | * @return 0 on success, 1 on error |
411 | */ | 415 | */ |
412 | int | 416 | int |
@@ -422,7 +426,7 @@ GNUNET_TESTING_peer_run (const char *testdir, | |||
422 | * Starts a service using the given configuration and then invokes the | 426 | * Starts a service using the given configuration and then invokes the |
423 | * given callback. This function ALSO initializes the scheduler loop | 427 | * given callback. This function ALSO initializes the scheduler loop |
424 | * and should thus be called directly from "main". The testcase | 428 | * and should thus be called directly from "main". The testcase |
425 | * should self-terminate by invoking 'GNUNET_SCHEDULER_shutdown'. | 429 | * should self-terminate by invoking #GNUNET_SCHEDULER_shutdown(). |
426 | * | 430 | * |
427 | * This function is useful if the testcase is for a single service | 431 | * This function is useful if the testcase is for a single service |
428 | * and if that service doesn't itself depend on other services. | 432 | * and if that service doesn't itself depend on other services. |
@@ -445,23 +449,6 @@ GNUNET_TESTING_service_run (const char *testdir, | |||
445 | void *tm_cls); | 449 | void *tm_cls); |
446 | 450 | ||
447 | 451 | ||
448 | /** | ||
449 | * Sometimes we use the binary name to determine which specific | ||
450 | * test to run. In those cases, the string after the last "_" | ||
451 | * in 'argv[0]' specifies a string that determines the configuration | ||
452 | * file or plugin to use. | ||
453 | * | ||
454 | * This function returns the respective substring, taking care | ||
455 | * of issues such as binaries ending in '.exe' on W32. | ||
456 | * | ||
457 | * @param argv0 the name of the binary | ||
458 | * @return string between the last '_' and the '.exe' (or the end of the string), | ||
459 | * NULL if argv0 has no '_' | ||
460 | */ | ||
461 | char * | ||
462 | GNUNET_TESTING_get_testname_from_underscore (const char *argv0); | ||
463 | |||
464 | |||
465 | #if 0 /* keep Emacsens' auto-indent happy */ | 452 | #if 0 /* keep Emacsens' auto-indent happy */ |
466 | { | 453 | { |
467 | #endif | 454 | #endif |
@@ -472,3 +459,5 @@ GNUNET_TESTING_get_testname_from_underscore (const char *argv0); | |||
472 | #endif | 459 | #endif |
473 | 460 | ||
474 | /** @} */ /* end of group */ | 461 | /** @} */ /* end of group */ |
462 | |||
463 | /** @} */ /* end of group addition */ | ||