GNUnet  0.10.x
Data Structures | Functions
testbed_api_test.c File Reference

high-level test function More...

#include "platform.h"
#include "gnunet_testbed_service.h"
Include dependency graph for testbed_api_test.c:

Go to the source code of this file.

Data Structures

struct  TestRunContext
 Context information for test run. More...
 

Functions

static void run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *config)
 Main run function. More...
 
int GNUNET_TESTBED_test_run (const char *testname, const char *cfg_filename, unsigned int num_peers, uint64_t event_mask, GNUNET_TESTBED_ControllerCallback cc, void *cc_cls, GNUNET_TESTBED_TestMaster test_master, void *test_master_cls)
 Convenience method for running a "simple" test on the local system with a single call from 'main'. More...
 

Detailed Description

high-level test function

Author
Christian Grothoff
Sree Harsha Totakura

Definition in file testbed_api_test.c.

Function Documentation

◆ run()

static void run ( void *  cls,
char *const *  args,
const char *  cfgfile,
const struct GNUNET_CONFIGURATION_Handle config 
)
static

Main run function.

Parameters
clsNULL
argsarguments passed to GNUNET_PROGRAM_run
cfgfilethe path to configuration file
configthe configuration file handle

Definition at line 77 of file testbed_api_test.c.

References TestRunContext::cc, TestRunContext::cc_cls, TestRunContext::event_mask, GNUNET_TESTBED_run(), TestRunContext::num_peers, TestRunContext::test_master, and TestRunContext::test_master_cls.

Referenced by GNUNET_TESTBED_test_run().

79 {
80  struct TestRunContext *rc = cls;
81 
82  GNUNET_TESTBED_run (NULL, config, rc->num_peers, rc->event_mask, rc->cc,
83  rc->cc_cls, rc->test_master, rc->test_master_cls);
84 }
GNUNET_TESTBED_TestMaster test_master
Test master callback.
Context information for test run.
uint64_t event_mask
event mask for the controller callback
void GNUNET_TESTBED_run(const char *host_filename, const struct GNUNET_CONFIGURATION_Handle *cfg, unsigned int num_peers, uint64_t event_mask, GNUNET_TESTBED_ControllerCallback cc, void *cc_cls, GNUNET_TESTBED_TestMaster test_master, void *test_master_cls)
Convenience method for running a testbed with a single call.
GNUNET_TESTBED_ControllerCallback cc
The controller event callback.
unsigned int num_peers
Number of peers to start.
void * test_master_cls
Closure for test master.
void * cc_cls
Closure for the above callback.
Here is the call graph for this function:
Here is the caller graph for this function: