diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-09-16 16:32:31 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-09-16 16:32:31 +0000 |
commit | d4b776d4dd77268b364d4a5a2f6f2b5b34cd7eee (patch) | |
tree | 1152662be22d3a03e1e089fb8c2ce4e8c154802f | |
parent | 5fd4317460e74a023998bca6e1b2edec532f1eba (diff) | |
download | gnunet-d4b776d4dd77268b364d4a5a2f6f2b5b34cd7eee.tar.gz gnunet-d4b776d4dd77268b364d4a5a2f6f2b5b34cd7eee.zip |
- generate test_testbed_api_barriers.conf in the testcase
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/testbed/test_testbed_api_barriers.c | 19 | ||||
-rw-r--r-- | src/testbed/test_testbed_api_barriers.conf.in | 5 |
3 files changed, 22 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 9f4e56435..eb51286c3 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1347,7 +1347,6 @@ src/statistics/statistics.conf | |||
1347 | src/template/Makefile | 1347 | src/template/Makefile |
1348 | src/testbed/Makefile | 1348 | src/testbed/Makefile |
1349 | src/testbed/testbed.conf | 1349 | src/testbed/testbed.conf |
1350 | src/testbed/test_testbed_api_barriers.conf | ||
1351 | src/testing/Makefile | 1350 | src/testing/Makefile |
1352 | src/topology/Makefile | 1351 | src/topology/Makefile |
1353 | src/transport/Makefile | 1352 | src/transport/Makefile |
diff --git a/src/testbed/test_testbed_api_barriers.c b/src/testbed/test_testbed_api_barriers.c index 35fda4b31..a0c6230b4 100644 --- a/src/testbed/test_testbed_api_barriers.c +++ b/src/testbed/test_testbed_api_barriers.c | |||
@@ -173,14 +173,33 @@ test_master (void *cls, | |||
173 | int | 173 | int |
174 | main (int argc, char **argv) | 174 | main (int argc, char **argv) |
175 | { | 175 | { |
176 | struct GNUNET_CONFIGURATION_Handle *cfg; | ||
177 | char pwd[PATH_MAX]; | ||
178 | char *binary; | ||
176 | uint64_t event_mask; | 179 | uint64_t event_mask; |
177 | 180 | ||
178 | result = GNUNET_SYSERR; | 181 | result = GNUNET_SYSERR; |
179 | event_mask = 0; | 182 | event_mask = 0; |
183 | cfg = GNUNET_CONFIGURATION_create (); | ||
184 | GNUNET_assert (GNUNET_YES == | ||
185 | GNUNET_CONFIGURATION_parse (cfg, | ||
186 | "test_testbed_api_barriers.conf.in")); | ||
187 | if (NULL == getcwd (pwd, PATH_MAX)) | ||
188 | return 1; | ||
189 | GNUNET_assert (0 < GNUNET_asprintf (&binary, "%s/%s", pwd, | ||
190 | "gnunet-service-test-barriers")); | ||
191 | GNUNET_CONFIGURATION_set_value_string (cfg, "test-barriers","BINARY", binary); | ||
192 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_write | ||
193 | (cfg, "test_testbed_api_barriers.conf")); | ||
194 | GNUNET_CONFIGURATION_destroy (cfg); | ||
195 | cfg = NULL; | ||
196 | GNUNET_free (binary); | ||
197 | binary = NULL; | ||
180 | (void) GNUNET_TESTBED_test_run ("test_testbed_api_barriers", | 198 | (void) GNUNET_TESTBED_test_run ("test_testbed_api_barriers", |
181 | "test_testbed_api_barriers.conf", NUM_PEERS, | 199 | "test_testbed_api_barriers.conf", NUM_PEERS, |
182 | event_mask, NULL, NULL, | 200 | event_mask, NULL, NULL, |
183 | &test_master, NULL); | 201 | &test_master, NULL); |
202 | (void) unlink ("test_testbed_api_barriers.conf"); | ||
184 | if (GNUNET_OK != result) | 203 | if (GNUNET_OK != result) |
185 | return 1; | 204 | return 1; |
186 | return 0; | 205 | return 0; |
diff --git a/src/testbed/test_testbed_api_barriers.conf.in b/src/testbed/test_testbed_api_barriers.conf.in index ba59aff99..720e1f199 100644 --- a/src/testbed/test_testbed_api_barriers.conf.in +++ b/src/testbed/test_testbed_api_barriers.conf.in | |||
@@ -12,13 +12,14 @@ PORT = 12366 | |||
12 | 12 | ||
13 | [test-barriers] | 13 | [test-barriers] |
14 | AUTOSTART = YES | 14 | AUTOSTART = YES |
15 | PORT = 12114 #not really used | 15 | PORT = 12114 |
16 | BINARY = @abs_srcdir@/gnunet-service-test-barriers | 16 | BINARY = /will/be/overwriten/in/test_testbed_api_barriers/ |
17 | 17 | ||
18 | [fs] | 18 | [fs] |
19 | AUTOSTART = NO | 19 | AUTOSTART = NO |
20 | 20 | ||
21 | [resolver] | 21 | [resolver] |
22 | HOSTNAME = localhost | ||
22 | AUTOSTART = NO | 23 | AUTOSTART = NO |
23 | 24 | ||
24 | [mesh] | 25 | [mesh] |