GNUnet  0.19.4
testbed_api_test.c File Reference

high-level test function More...

#include "platform.h"
#include "gnunet_testbed_service.h"
#include "testbed.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
Tobias Frisch

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 79 of file testbed_api_test.c.

81 {
82  struct TestRunContext *rc = cls;
83 
84  GNUNET_TESTBED_run (NULL, config, rc->num_peers, rc->event_mask, rc->cc,
85  rc->cc_cls, rc->test_master, rc->test_master_cls);
86 }
static const struct GNUNET_CONFIGURATION_Handle * config
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.
Context information for test run.
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.
uint64_t event_mask
event mask for the controller callback
GNUNET_TESTBED_TestMaster test_master
Test master callback.

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

Referenced by GNUNET_TESTBED_test_run().

Here is the call graph for this function:
Here is the caller graph for this function: