diff options
Diffstat (limited to 'src/testing/testing.c')
-rw-r--r-- | src/testing/testing.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c index e7c840ec9..577657897 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -926,7 +926,7 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system, | |||
926 | } | 926 | } |
927 | peer = GNUNET_malloc (sizeof (struct GNUNET_TESTING_Peer)); | 927 | peer = GNUNET_malloc (sizeof (struct GNUNET_TESTING_Peer)); |
928 | peer->cfgfile = config_filename; /* Free in peer_destroy */ | 928 | peer->cfgfile = config_filename; /* Free in peer_destroy */ |
929 | peer->main_binary = GNUNET_strdup ("gnunet-service-arm"); | 929 | peer->main_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
930 | peer->system = system; | 930 | peer->system = system; |
931 | peer->key_number = key_number; | 931 | peer->key_number = key_number; |
932 | return peer; | 932 | return peer; |
@@ -1127,6 +1127,7 @@ GNUNET_TESTING_service_run (const char *testdir, | |||
1127 | struct GNUNET_TESTING_System *system; | 1127 | struct GNUNET_TESTING_System *system; |
1128 | struct GNUNET_TESTING_Peer *peer; | 1128 | struct GNUNET_TESTING_Peer *peer; |
1129 | struct GNUNET_CONFIGURATION_Handle *cfg; | 1129 | struct GNUNET_CONFIGURATION_Handle *cfg; |
1130 | char *binary; | ||
1130 | 1131 | ||
1131 | GNUNET_log_setup (testdir, "WARNING", NULL); | 1132 | GNUNET_log_setup (testdir, "WARNING", NULL); |
1132 | system = GNUNET_TESTING_system_create (testdir, "127.0.0.1", NULL); | 1133 | system = GNUNET_TESTING_system_create (testdir, "127.0.0.1", NULL); |
@@ -1150,7 +1151,9 @@ GNUNET_TESTING_service_run (const char *testdir, | |||
1150 | return 1; | 1151 | return 1; |
1151 | } | 1152 | } |
1152 | GNUNET_free (peer->main_binary); | 1153 | GNUNET_free (peer->main_binary); |
1153 | GNUNET_asprintf (&peer->main_binary, "gnunet-service-%s", service_name); | 1154 | GNUNET_asprintf (&binary, "gnunet-service-%s", service_name); |
1155 | peer->main_binary = GNUNET_OS_get_libexec_binary_path (binary); | ||
1156 | GNUNET_free (binary); | ||
1154 | if (GNUNET_OK != GNUNET_TESTING_peer_start (peer)) | 1157 | if (GNUNET_OK != GNUNET_TESTING_peer_start (peer)) |
1155 | { | 1158 | { |
1156 | GNUNET_TESTING_peer_destroy (peer); | 1159 | GNUNET_TESTING_peer_destroy (peer); |