aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2011-07-26 12:48:39 +0000
committerNathan S. Evans <evans@in.tum.de>2011-07-26 12:48:39 +0000
commit272d0d7b657859b382b82078e5fab3b74d39c01f (patch)
tree30aa749f6cd2ace40ba21b79a50a6903a2a3081a
parent66e9353163686f84163816a7fee09209ce522fcb (diff)
downloadgnunet-272d0d7b657859b382b82078e5fab3b74d39c01f.tar.gz
gnunet-272d0d7b657859b382b82078e5fab3b74d39c01f.zip
remote host testing
-rw-r--r--src/testing/testing_group.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c
index 89e866d10..6ce953b06 100644
--- a/src/testing/testing_group.c
+++ b/src/testing/testing_group.c
@@ -6123,6 +6123,21 @@ GNUNET_TESTING_daemons_start(const struct GNUNET_CONFIGURATION_Handle *cfg,
6123 for (off = 0; off < hostcnt; off++) 6123 for (off = 0; off < hostcnt; off++)
6124 { 6124 {
6125 6125
6126 if (hostcnt > 0)
6127 {
6128 hostname = pg->hosts[off % hostcnt].hostname;
6129 username = pg->hosts[off % hostcnt].username;
6130 sshport = pg->hosts[off % hostcnt].sshport;
6131 pcfg = make_config (cfg, off, &pg->hosts[off % hostcnt].minport,
6132 &upnum, hostname, &fdnum);
6133 }
6134 else
6135 {
6136 hostname = NULL;
6137 username = NULL;
6138 sshport = 0;
6139 }
6140
6126 if (GNUNET_YES 6141 if (GNUNET_YES
6127 == GNUNET_CONFIGURATION_get_value_string (pcfg, "PATHS", 6142 == GNUNET_CONFIGURATION_get_value_string (pcfg, "PATHS",
6128 "SERVICEHOME", 6143 "SERVICEHOME",
@@ -6146,36 +6161,30 @@ GNUNET_TESTING_daemons_start(const struct GNUNET_CONFIGURATION_Handle *cfg,
6146 GNUNET_asprintf (&newservicehome, "%s/%s/%d/", tmpdir, 6161 GNUNET_asprintf (&newservicehome, "%s/%s/%d/", tmpdir,
6147 "gnunet-testing-test-test", off); 6162 "gnunet-testing-test-test", off);
6148 } 6163 }
6149 GNUNET_asprintf (&newservicehome,
6150 "%s/%s/",
6151 baseservicehome,
6152 pg->hosts[off].hostname);
6153 6164
6154 if (NULL != username) 6165 if (NULL != username)
6155 GNUNET_asprintf (&arg, 6166 GNUNET_asprintf (&arg,
6156 "%s@%s:%s/%s", 6167 "%s@%s:%s/%s",
6157 username, 6168 username,
6158 pg->hosts[off].hostname, 6169 pg->hosts[off].hostname,
6159 baseservicehome, 6170 newservicehome,
6160 pg->hosts[off].hostname); 6171 pg->hosts[off].hostname);
6161 else 6172 else
6162 GNUNET_asprintf (&arg, 6173 GNUNET_asprintf (&arg,
6163 "%s:%s/%s", 6174 "%s:%s/%s",
6164 pg->hosts[off].hostname, 6175 pg->hosts[off].hostname,
6165 baseservicehome, 6176 newservicehome,
6166 pg->hosts[off].hostname); 6177 pg->hosts[off].hostname);
6167 6178
6168 GNUNET_free (baseservicehome);
6169
6170 /* FIXME: Doesn't support ssh_port option! */ 6179 /* FIXME: Doesn't support ssh_port option! */
6171 proc = GNUNET_OS_start_process (NULL, NULL, 6180 proc = GNUNET_OS_start_process (NULL, NULL,
6172 "rsync", 6181 "rsync",
6173 "rsync", "-r", newservicehome, arg, NULL); 6182 "rsync", "-r", newservicehome, arg, NULL);
6174 6183
6175 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 6184 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
6176 "copying directory with command rsync -r %s %s\n", 6185 "copying directory with command rsync -r %s %s\n",
6177 newservicehome, arg); 6186 newservicehome, arg);
6178 6187 GNUNET_free(newservicehome);
6179 GNUNET_free (arg); 6188 GNUNET_free (arg);
6180 if (NULL == proc) 6189 if (NULL == proc)
6181 { 6190 {