aboutsummaryrefslogtreecommitdiff
path: root/src/testing_old/testing.c
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2012-09-30 02:05:02 +0000
committerLRN <lrn1986@gmail.com>2012-09-30 02:05:02 +0000
commit1f2907c29a80941b0d5c026fbf11b9bc9a59921c (patch)
treedef3487ddd7b85e78cfe4c145dba4820349eac53 /src/testing_old/testing.c
parent6bee2a739c8e0c5090b0a75ad9c42e1cbd7f0b66 (diff)
downloadgnunet-1f2907c29a80941b0d5c026fbf11b9bc9a59921c.tar.gz
gnunet-1f2907c29a80941b0d5c026fbf11b9bc9a59921c.zip
Short timeout for starting local services
Diffstat (limited to 'src/testing_old/testing.c')
-rw-r--r--src/testing_old/testing.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/testing_old/testing.c b/src/testing_old/testing.c
index be6f3dcb5..9254d4917 100644
--- a/src/testing_old/testing.c
+++ b/src/testing_old/testing.c
@@ -241,7 +241,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
241 if (NULL == d->hostname) 241 if (NULL == d->hostname)
242 { 242 {
243 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 243 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
244 "Starting `%s', with command `%s %s %s %s'.\n", 244 "Starting local `%s', with command `%s %s %s %s'.\n",
245 "gnunet-peerinfo", "gnunet-peerinfo", "-c", d->cfgfile, 245 "gnunet-peerinfo", "gnunet-peerinfo", "-c", d->cfgfile,
246 "-sq"); 246 "-sq");
247 d->proc_arm_peerinfo = 247 d->proc_arm_peerinfo =
@@ -258,7 +258,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
258 dst = GNUNET_strdup (d->hostname); 258 dst = GNUNET_strdup (d->hostname);
259 259
260 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 260 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
261 "Starting `%s', with command `%s %s %s %s %s %s'.\n", 261 "Starting remove `%s', with command `%s %s %s %s %s %s'.\n",
262 "gnunet-peerinfo", "ssh", dst, "gnunet-peerinfo", "-c", 262 "gnunet-peerinfo", "ssh", dst, "gnunet-peerinfo", "-c",
263 d->cfgfile, "-sq"); 263 d->cfgfile, "-sq");
264 if (d->ssh_port_str == NULL) 264 if (d->ssh_port_str == NULL)
@@ -410,16 +410,13 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
410 if (NULL == d->hostname) 410 if (NULL == d->hostname)
411 { 411 {
412 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 412 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
413 "Starting `%s', with command `%s %s %s %s'.\n", 413 "Starting local `%s', with command `%s %s %s %s'.\n",
414 "gnunet-arm", "gnunet-arm", "-c", d->cfgfile, 414 "gnunet-arm", "gnunet-arm", "-c", d->cfgfile,
415 "-s"); 415 "-s");
416 d->proc_arm_start = 416 d->proc_arm_start =
417 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-arm", "gnunet-arm", "-c", 417 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-arm", "gnunet-arm", "-c",
418 d->cfgfile, 418 d->cfgfile,
419 "-s", "-q", "-T", 419 "-s", "-q", "-T", "5 s", NULL);
420 GNUNET_STRINGS_relative_time_to_string
421 (GNUNET_TIME_absolute_get_remaining
422 (d->max_timeout), GNUNET_NO), NULL);
423 } 420 }
424 else 421 else
425 { 422 {
@@ -429,7 +426,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
429 dst = GNUNET_strdup (d->hostname); 426 dst = GNUNET_strdup (d->hostname);
430 427
431 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 428 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
432 "Starting `%s', with command `%s %s %s %s %s %s %s'.\n", 429 "Starting remote `%s', with command `%s %s %s %s %s %s %s'.\n",
433 "gnunet-arm", "ssh", dst, "gnunet-arm", "-c", d->cfgfile, 430 "gnunet-arm", "ssh", dst, "gnunet-arm", "-c", d->cfgfile,
434 "-s", "-q"); 431 "-s", "-q");
435 if (d->ssh_port_str == NULL) 432 if (d->ssh_port_str == NULL)
@@ -910,8 +907,7 @@ GNUNET_TESTING_daemon_start_stopped_service (struct GNUNET_TESTING_Daemon *d,
910 "Starting gnunet-arm with config `%s' locally.\n", d->cfgfile); 907 "Starting gnunet-arm with config `%s' locally.\n", d->cfgfile);
911 d->proc_arm_srv_start = GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-arm", "gnunet-arm", 908 d->proc_arm_srv_start = GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-arm", "gnunet-arm",
912 "-c", d->cfgfile, "-i", service, "-q", 909 "-c", d->cfgfile, "-i", service, "-q",
913 "-T", 910 "-T", "5 s",
914 GNUNET_STRINGS_relative_time_to_string (timeout, GNUNET_NO),
915 NULL); 911 NULL);
916 } 912 }
917 913
@@ -979,13 +975,10 @@ GNUNET_TESTING_daemon_start_service (struct GNUNET_TESTING_Daemon *d,
979 "Starting gnunet-arm with config `%s' locally.\n", d->cfgfile); 975 "Starting gnunet-arm with config `%s' locally.\n", d->cfgfile);
980 d->proc_arm_srv_start = GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-arm", "gnunet-arm", 976 d->proc_arm_srv_start = GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-arm", "gnunet-arm",
981 "-c", d->cfgfile, "-i", service, "-q", 977 "-c", d->cfgfile, "-i", service, "-q",
982 "-T", 978 "-T", "5 s", NULL);
983 GNUNET_STRINGS_relative_time_to_string (timeout, GNUNET_NO),
984 NULL);
985 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 979 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
986 "Starting gnunet-arm with command %s -c %s -i %s -q -T %s\n", 980 "Starting gnunet-arm with command %s -c %s -i %s -q -T \"5 s\"\n",
987 "gnunet-arm", d->cfgfile, service, 981 "gnunet-arm", d->cfgfile, service);
988 GNUNET_STRINGS_relative_time_to_string (timeout, GNUNET_NO));
989 } 982 }
990 983
991 d->max_timeout = GNUNET_TIME_relative_to_absolute (timeout); 984 d->max_timeout = GNUNET_TIME_relative_to_absolute (timeout);