2 This file is part of GNUnet
3 (C) 2008--2012 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file testbed/testbed_api_test.c
23 * @brief high-level test function
24 * @author Christian Grothoff
27 #include "gnunet_testbed_service.h"
33 * Convenience method for running a "simple" test on the local system
34 * with a single call from 'main'. Underlay and overlay topology are
35 * configured using the "UNDERLAY" and "OVERLAY" options in the
36 * "[testbed]" section of the configuration (with possible options
37 * given in "UNDERLAY_XXX" and/or "OVERLAY_XXX").
39 * The test is to be terminated using a call to
40 * "GNUNET_SCHEDULER_shutdown". If starting the test fails,
41 * the program is stopped without 'master' ever being run.
43 * NOTE: this function should be called from 'main', NOT from
44 * within a GNUNET_SCHEDULER-loop. This function will initialze
45 * the scheduler loop, the testbed and then pass control to
48 * @param testname name of the testcase (to configure logging, etc.)
49 * @param cfg_filename configuration filename to use
50 * (for testbed, controller and peers)
51 * @param num_peers number of peers to start
52 * @param test_master task to run once the test is ready
53 * @param test_master_cls closure for 'task'.
56 GNUNET_TESTBED_test_run (const char *testname,
57 const char *cfg_filename,
58 unsigned int num_peers,
59 GNUNET_TESTBED_TestMaster test_master,
60 void *test_master_cls)
67 /* end of testbed_api_test.c */