Go to the source code of this file.
Data Structures | |
struct | MainParams |
Closure for loop_run(). More... | |
Functions | |
static void | handle_result (void *cls, enum GNUNET_GenericReturnValue rv) |
Function called with the final result of the test. More... | |
static void | do_shutdown (void *cls) |
static void | loop_run (void *cls) |
Main function to run the test cases. More... | |
int | GNUNET_TESTING_main (const struct GNUNET_TESTING_Command *commands, struct GNUNET_TIME_Relative timeout) |
Start a GNUnet scheduler event loop and run the testsuite. More... | |
|
static |
Function called with the final result of the test.
cls | the struct MainParams |
rv | GNUNET_OK if the test passed |
Definition at line 68 of file testing_api_main.c.
References GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_NO, GNUNET_OK, GNUNET_SCHEDULER_shutdown(), GNUNET_SYSERR, MainParams::is, and MainParams::rv.
Referenced by loop_run().
|
static |
Definition at line 94 of file testing_api_main.c.
References GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_TESTING_interpreter_fail(), and MainParams::is.
Referenced by loop_run().
|
static |
Main function to run the test cases.
cls | a struct MainParams * |
Definition at line 113 of file testing_api_main.c.
References MainParams::commands, do_shutdown(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_TESTING_run(), handle_result(), MainParams::is, and MainParams::timeout.
Referenced by GNUNET_TESTING_main().
int GNUNET_TESTING_main | ( | const struct GNUNET_TESTING_Command * | commands, |
struct GNUNET_TIME_Relative | timeout | ||
) |
Start a GNUnet scheduler event loop and run the testsuite.
Return 0 upon success. Expected to be called directly from main().
commands | the list of command to execute |
timeout | how long to wait for each command to execute |
Definition at line 127 of file testing_api_main.c.
References commands, MainParams::commands, GNUNET_SCHEDULER_run(), loop_run(), MainParams::rv, and timeout.
Referenced by main().