2 if (NULL == (perf_ats = GNUNET_ATS_performance_init (cfg, &ats_perf_cb, NULL)))
4 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
5 "Failed to connect to performance API\n");
6 GNUNET_SCHEDULER_add_now (end_badly, NULL);
8 This file is part of GNUnet.
9 (C) 2010-2013 Christian Grothoff (and other contributing authors)
11 GNUnet is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published
13 by the Free Software Foundation; either version 3, or (at your
14 option) any later version.
16 GNUnet is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with GNUnet; see the file COPYING. If not, write to the
23 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA.
27 * @file ats/test_ats_solver_add_address.c
28 * @brief solver test: add address
29 * @author Christian Grothoff
30 * @author Matthias Wachs
33 #include "gnunet_util_lib.h"
34 #include "gnunet_testbed_service.h"
35 #include "gnunet_ats_service.h"
41 run (void *cls, const struct GNUNET_CONFIGURATION_Handle *mycfg,
42 struct GNUNET_TESTING_Peer *peer)
48 main (int argc, char *argv[])
51 char *src_filename = GNUNET_strdup (__FILE__);
52 char *test_filename = GNUNET_strdup (argv[0]);
58 if (NULL == (sep = (strstr (src_filename,".c"))))
65 if (NULL != (sep = strstr (test_filename, ".exe")))
68 if (NULL == (solver = strstr (test_filename, src_filename)))
73 solver += strlen (src_filename) +1;
75 if (0 == strcmp(solver, "proportional"))
77 config_file = "test_ats_solver_proportional.conf";
79 else if (0 == strcmp(solver, "mlp"))
81 config_file = "test_ats_solver_mlp.conf";
83 else if ((0 == strcmp(solver, "ril")))
85 config_file = "test_ats_solver_ril.conf";
90 GNUNET_free (src_filename);
91 GNUNET_free (test_filename);
95 GNUNET_free (src_filename);
96 GNUNET_free (test_filename);
98 if (0 != GNUNET_TESTING_peer_run ("test_ats_api_performance",
99 config_file, &run, NULL ))
100 return GNUNET_SYSERR;
105 /* end of file test_ats_solver_add_address.c */