From: Nathan S. Evans Date: Thu, 7 Apr 2011 10:18:14 +0000 (+0000) Subject: add comment about extending this basic testcase X-Git-Tag: initial-import-from-subversion-38251~18751 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=54268de4e171e77d019a900cc341ed4ffa689476;p=oweals%2Fgnunet.git add comment about extending this basic testcase --- diff --git a/src/testing/test_testing_peergroup.c b/src/testing/test_testing_peergroup.c index 98bd7d869..6359af754 100644 --- a/src/testing/test_testing_peergroup.c +++ b/src/testing/test_testing_peergroup.c @@ -80,6 +80,22 @@ my_cb (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer Group started successfully, ending test!\n"); + /** + * If something is to actually be DONE with the testcase, it should + * be put in here. Usually there will be a struct declared (or global + * variables can be used) to keep track of the state, statistics, + * handles to peers, etc. The example here is the opaque "TestCaseData" + * struct that could be passed into a function "additional_code_for_testing" + * which can be used to perform actions on the peers in the peergroup. + * Also, the GNUNET_TESTING_daemons_stop call would need to be removed, + * and only called once all of the testing is complete. + */ + + /** + * struct TestcaseData *state_closure; + * GNUNET_SCHEDULER_add_now(&additional_code_for_testing, state_closure); + */ + GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); }