diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-11-11 16:45:09 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-11-11 16:45:09 +0100 |
commit | 17edb09f384689da5923689dfe4b6d071797091c (patch) | |
tree | 826f63700898dd4c939ef0a8d105c210cc60c7a5 /src/include | |
parent | 4885b899c76d11de06cf0ac5050985698045505b (diff) |
extend testing logic to setup handle for the auditor
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_testing_auditor_lib.h | 18 | ||||
-rw-r--r-- | src/include/taler_testing_lib.h | 28 |
2 files changed, 46 insertions, 0 deletions
diff --git a/src/include/taler_testing_auditor_lib.h b/src/include/taler_testing_auditor_lib.h index 2a11b74cb..554fadf5c 100644 --- a/src/include/taler_testing_auditor_lib.h +++ b/src/include/taler_testing_auditor_lib.h @@ -36,4 +36,22 @@ /* ********************* Helper functions ********************* */ +/** + * Install signal handlers plus schedules the main wrapper + * around the "run" method. + * + * @param main_cb the "run" method which contains all the + * commands. + * @param main_cb_cls a closure for "run", typically NULL. + * @param config_filename configuration filename. + * @return #GNUNET_OK if all is okay, != #GNUNET_OK otherwise. + * non-GNUNET_OK codes are #GNUNET_SYSERR most of the + * times. + */ +int +TALER_TESTING_AUDITOR_setup (TALER_TESTING_Main main_cb, + void *main_cb_cls, + const char *config_filename); + + #endif diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index cbc28f535..9ea10f7e7 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -281,6 +281,11 @@ struct TALER_TESTING_Interpreter struct GNUNET_CURL_Context *ctx; /** + * Our configuration. + */ + const struct GNUNET_CONFIGURATION_Handle *cfg; + + /** * Context for running the CURL event loop. */ struct GNUNET_CURL_RescheduleContext *rc; @@ -297,6 +302,16 @@ struct TALER_TESTING_Interpreter struct GNUNET_SCHEDULER_Task *timeout_task; /** + * Function to call for cleanup at the end. Can be NULL. + */ + GNUNET_SCHEDULER_TaskCallback final_cleanup_cb; + + /** + * Closure for #final_cleanup_cb(). + */ + void *final_cleanup_cb_cls; + + /** * Instruction pointer. Tells #interpreter_run() which * instruction to run next. Need (signed) int because * it gets -1 when rewinding the interpreter to the first @@ -315,6 +330,13 @@ struct TALER_TESTING_Interpreter struct TALER_EXCHANGE_Handle *exchange; /** + * Handle to the auditor. NULL unless specifically initialized + * as part of libtalertestingauditor's + * #TALER_TESTING_AUDITOR_main_wrapper(). + */ + struct TALER_AUDITOR_Handle *auditor; + + /** * Handle to exchange process; some commands need it * to send signals. E.g. to trigger the key state reload. */ @@ -334,6 +356,12 @@ struct TALER_TESTING_Interpreter int working; /** + * Is the auditor running (#GNUNET_YES) or waiting + * for /version (#GNUNET_NO)? + */ + int auditor_working; + + /** * How often have we gotten a /keys response so far? */ unsigned int key_generation; |