aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_test.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2012-12-11 12:27:41 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2012-12-11 12:27:41 +0000
commit15d78567a6dfa9f4644321e094c8b0eec717ec4e (patch)
tree4fe9977c8df426847c166ae9dfccfe20196a8dc9 /src/testbed/testbed_api_test.c
parentc70d10589c4189a255066032bdd1d72204641247 (diff)
downloadgnunet-15d78567a6dfa9f4644321e094c8b0eec717ec4e.tar.gz
gnunet-15d78567a6dfa9f4644321e094c8b0eec717ec4e.zip
GNUNET_TESTBED_test_run to return status
Diffstat (limited to 'src/testbed/testbed_api_test.c')
-rw-r--r--src/testbed/testbed_api_test.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/testbed/testbed_api_test.c b/src/testbed/testbed_api_test.c
index 580917aa7..0fa55fa36 100644
--- a/src/testbed/testbed_api_test.c
+++ b/src/testbed/testbed_api_test.c
@@ -168,7 +168,7 @@ run (void *cls, char *const *args, const char *cfgfile,
168 * @param test_master task to run once the test is ready 168 * @param test_master task to run once the test is ready
169 * @param test_master_cls closure for 'task'. 169 * @param test_master_cls closure for 'task'.
170 */ 170 */
171void 171int
172GNUNET_TESTBED_test_run (const char *testname, const char *cfg_filename, 172GNUNET_TESTBED_test_run (const char *testname, const char *cfg_filename,
173 unsigned int num_peers, 173 unsigned int num_peers,
174 uint64_t event_mask, 174 uint64_t event_mask,
@@ -187,6 +187,7 @@ GNUNET_TESTBED_test_run (const char *testname, const char *cfg_filename,
187 GNUNET_GETOPT_OPTION_END 187 GNUNET_GETOPT_OPTION_END
188 }; 188 };
189 struct TestRunContext *rc; 189 struct TestRunContext *rc;
190 int ret;
190 191
191 argv2[0] = GNUNET_strdup (testname); 192 argv2[0] = GNUNET_strdup (testname);
192 argv2[2] = GNUNET_strdup (cfg_filename); 193 argv2[2] = GNUNET_strdup (cfg_filename);
@@ -200,11 +201,12 @@ GNUNET_TESTBED_test_run (const char *testname, const char *cfg_filename,
200 rc->event_mask = event_mask; 201 rc->event_mask = event_mask;
201 rc->cc = cc; 202 rc->cc = cc;
202 rc->cc_cls = cc_cls; 203 rc->cc_cls = cc_cls;
203 (void) GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, 204 ret = GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2,
204 testname, "nohelp", options, &run, rc); 205 testname, "nohelp", options, &run, rc);
205 GNUNET_free (rc); 206 GNUNET_free (rc);
206 GNUNET_free (argv2[0]); 207 GNUNET_free (argv2[0]);
207 GNUNET_free (argv2[2]); 208 GNUNET_free (argv2[2]);
209 return ret;
208} 210}
209 211
210/* end of testbed_api_test.c */ 212/* end of testbed_api_test.c */