diff options
Diffstat (limited to 'src/testbed')
-rw-r--r-- | src/testbed/Makefile.am | 1 | ||||
-rwxr-xr-x | src/testbed/netjail_exec.sh | 2 | ||||
-rwxr-xr-x | src/testbed/netjail_start.sh | 2 | ||||
-rwxr-xr-x | src/testbed/netjail_stop.sh | 2 | ||||
-rw-r--r-- | src/testbed/testbed_api_cmd_netjail_start.c | 2 | ||||
-rw-r--r-- | src/testbed/testbed_api_cmd_netjail_start_testbed.c | 24 | ||||
-rw-r--r-- | src/testbed/testbed_api_cmd_netjail_stop.c | 2 |
7 files changed, 18 insertions, 17 deletions
diff --git a/src/testbed/Makefile.am b/src/testbed/Makefile.am index 201b4c1ff..a9837daf5 100644 --- a/src/testbed/Makefile.am +++ b/src/testbed/Makefile.am | |||
@@ -101,6 +101,7 @@ gnunet_cmds_helper_SOURCES = \ | |||
101 | gnunet_cmds_helper_LDADD = $(XLIB) \ | 101 | gnunet_cmds_helper_LDADD = $(XLIB) \ |
102 | $(top_builddir)/src/util/libgnunetutil.la \ | 102 | $(top_builddir)/src/util/libgnunetutil.la \ |
103 | $(top_builddir)/src/testing/libgnunettesting.la \ | 103 | $(top_builddir)/src/testing/libgnunettesting.la \ |
104 | $(top_builddir)/src/transport/libgnunettransport.la \ | ||
104 | libgnunettestbed.la \ | 105 | libgnunettestbed.la \ |
105 | $(LTLIBINTL) $(Z_LIBS) | 106 | $(LTLIBINTL) $(Z_LIBS) |
106 | 107 | ||
diff --git a/src/testbed/netjail_exec.sh b/src/testbed/netjail_exec.sh index 532f4711c..b76d2e444 100755 --- a/src/testbed/netjail_exec.sh +++ b/src/testbed/netjail_exec.sh | |||
@@ -1,5 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | . "./netjail_core.sh" | 2 | . "./../testbed/netjail_core.sh" |
3 | 3 | ||
4 | set -eu | 4 | set -eu |
5 | set -x | 5 | set -x |
diff --git a/src/testbed/netjail_start.sh b/src/testbed/netjail_start.sh index a2abca2d7..4c1c33c83 100755 --- a/src/testbed/netjail_start.sh +++ b/src/testbed/netjail_start.sh | |||
@@ -1,5 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | . "./netjail_core.sh" | 2 | . "./../testbed/netjail_core.sh" |
3 | 3 | ||
4 | set -eu | 4 | set -eu |
5 | set -x | 5 | set -x |
diff --git a/src/testbed/netjail_stop.sh b/src/testbed/netjail_stop.sh index 4763cb107..689bf7ae9 100755 --- a/src/testbed/netjail_stop.sh +++ b/src/testbed/netjail_stop.sh | |||
@@ -1,5 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | . "./netjail_core.sh" | 2 | . "./../testbed/netjail_core.sh" |
3 | 3 | ||
4 | set -eu | 4 | set -eu |
5 | set -x | 5 | set -x |
diff --git a/src/testbed/testbed_api_cmd_netjail_start.c b/src/testbed/testbed_api_cmd_netjail_start.c index 1e37d5475..bc035abe7 100644 --- a/src/testbed/testbed_api_cmd_netjail_start.c +++ b/src/testbed/testbed_api_cmd_netjail_start.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include "gnunet_testing_ng_lib.h" | 28 | #include "gnunet_testing_ng_lib.h" |
29 | #include "gnunet_testbed_ng_service.h" | 29 | #include "gnunet_testbed_ng_service.h" |
30 | 30 | ||
31 | #define NETJAIL_START_SCRIPT "./netjail_start.sh" | 31 | #define NETJAIL_START_SCRIPT "./../testbed/netjail_start.sh" |
32 | 32 | ||
33 | struct NetJailState | 33 | struct NetJailState |
34 | { | 34 | { |
diff --git a/src/testbed/testbed_api_cmd_netjail_start_testbed.c b/src/testbed/testbed_api_cmd_netjail_start_testbed.c index 9b68c52f6..67f0ef55c 100644 --- a/src/testbed/testbed_api_cmd_netjail_start_testbed.c +++ b/src/testbed/testbed_api_cmd_netjail_start_testbed.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "testbed_api_hosts.h" | 30 | #include "testbed_api_hosts.h" |
31 | #include "testbed_helper.h" | 31 | #include "testbed_helper.h" |
32 | 32 | ||
33 | #define NETJAIL_EXEC_SCRIPT "./netjail_exec.sh" | 33 | #define NETJAIL_EXEC_SCRIPT "./../testbed/netjail_exec.sh" |
34 | 34 | ||
35 | struct HelperMessage; | 35 | struct HelperMessage; |
36 | 36 | ||
@@ -319,15 +319,15 @@ create_helper_init_msg_ (char *m_char, | |||
319 | static void | 319 | static void |
320 | start_testbed (struct NetJailState *ns, struct | 320 | start_testbed (struct NetJailState *ns, struct |
321 | GNUNET_CONFIGURATION_Handle *config, | 321 | GNUNET_CONFIGURATION_Handle *config, |
322 | char *n_char, | 322 | char *m_char, |
323 | char *m_char) | 323 | char *n_char) |
324 | { | 324 | { |
325 | struct GNUNET_CONFIGURATION_Handle *cfg; | 325 | // struct GNUNET_CONFIGURATION_Handle *cfg; |
326 | struct GNUNET_CMDS_HelperInit *msg; | 326 | struct GNUNET_CMDS_HelperInit *msg; |
327 | struct TestbedCount *tbc; | 327 | struct TestbedCount *tbc; |
328 | char *const script_argv[] = {NETJAIL_EXEC_SCRIPT, | 328 | char *const script_argv[] = {NETJAIL_EXEC_SCRIPT, |
329 | n_char, | ||
330 | m_char, | 329 | m_char, |
330 | n_char, | ||
331 | GNUNET_OS_get_libexec_binary_path ( | 331 | GNUNET_OS_get_libexec_binary_path ( |
332 | HELPER_CMDS_BINARY), | 332 | HELPER_CMDS_BINARY), |
333 | ns->global_n, | 333 | ns->global_n, |
@@ -345,17 +345,17 @@ start_testbed (struct NetJailState *ns, struct | |||
345 | tbc->ns = ns; | 345 | tbc->ns = ns; |
346 | tbc->count = (n - 1) * atoi (ns->local_m) + m; | 346 | tbc->count = (n - 1) * atoi (ns->local_m) + m; |
347 | 347 | ||
348 | cfg = GNUNET_CONFIGURATION_dup (config); | 348 | // cfg = GNUNET_CONFIGURATION_dup (config); |
349 | 349 | ||
350 | // TODO We do not need this? | 350 | // TODO We do not need this? |
351 | GNUNET_array_append (ns->host, ns->n_host, | 351 | /*GNUNET_array_append (ns->host, ns->n_host, |
352 | GNUNET_TESTBED_host_create_with_id (tbc->count - 1, | 352 | GNUNET_TESTBED_host_create_with_id (tbc->count - 1, |
353 | NULL, | 353 | NULL, |
354 | NULL, | 354 | NULL, |
355 | cfg, | 355 | cfg, |
356 | 0)); | 356 | 0));*/ |
357 | 357 | ||
358 | if ((GNUNET_YES != GNUNET_DISK_file_test ("test_testbed_api.conf")) || | 358 | /*if ((GNUNET_YES != GNUNET_DISK_file_test ("test_testbed_api.conf")) || |
359 | (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (config, | 359 | (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (config, |
360 | "test_testbed_api.conf"))) | 360 | "test_testbed_api.conf"))) |
361 | { | 361 | { |
@@ -363,7 +363,7 @@ start_testbed (struct NetJailState *ns, struct | |||
363 | _ ( | 363 | _ ( |
364 | "Unreadable or malformed configuration file `%s', exit ...\n"), | 364 | "Unreadable or malformed configuration file `%s', exit ...\n"), |
365 | "test_testbed_api.conf"); | 365 | "test_testbed_api.conf"); |
366 | } | 366 | }*/ |
367 | 367 | ||
368 | GNUNET_array_append (ns->helper, ns->n_helper, GNUNET_HELPER_start ( | 368 | GNUNET_array_append (ns->helper, ns->n_helper, GNUNET_HELPER_start ( |
369 | GNUNET_YES, | 369 | GNUNET_YES, |
@@ -425,8 +425,8 @@ netjail_exec_run (void *cls, | |||
425 | sprintf (str_n, "%d", i); | 425 | sprintf (str_n, "%d", i); |
426 | sprintf (str_m, "%d", j); | 426 | sprintf (str_m, "%d", j); |
427 | start_testbed (ns, config, | 427 | start_testbed (ns, config, |
428 | str_n, | 428 | str_m, |
429 | str_m); | 429 | str_n); |
430 | } | 430 | } |
431 | } | 431 | } |
432 | } | 432 | } |
diff --git a/src/testbed/testbed_api_cmd_netjail_stop.c b/src/testbed/testbed_api_cmd_netjail_stop.c index 1e6586f94..c0fc33ff9 100644 --- a/src/testbed/testbed_api_cmd_netjail_stop.c +++ b/src/testbed/testbed_api_cmd_netjail_stop.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "gnunet_testbed_ng_service.h" | 29 | #include "gnunet_testbed_ng_service.h" |
30 | 30 | ||
31 | 31 | ||
32 | #define NETJAIL_STOP_SCRIPT "./netjail_stop.sh" | 32 | #define NETJAIL_STOP_SCRIPT "./../testbed/netjail_stop.sh" |
33 | 33 | ||
34 | struct GNUNET_ChildWaitHandle *cwh; | 34 | struct GNUNET_ChildWaitHandle *cwh; |
35 | 35 | ||