aboutsummaryrefslogtreecommitdiff
path: root/src/testing/test_testing_group_remote.c
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-06-14 09:37:21 +0000
committerNathan S. Evans <evans@in.tum.de>2010-06-14 09:37:21 +0000
commite5d0b4aadf77fb0a303320f9a6568a5d64cf8e00 (patch)
tree716c24011d21921c3efb3b89888e5c999cd4916c /src/testing/test_testing_group_remote.c
parent5f04609b906a435465dc09ff31173aafb0353e9b (diff)
downloadgnunet-e5d0b4aadf77fb0a303320f9a6568a5d64cf8e00.tar.gz
gnunet-e5d0b4aadf77fb0a303320f9a6568a5d64cf8e00.zip
test case config files
Diffstat (limited to 'src/testing/test_testing_group_remote.c')
-rw-r--r--src/testing/test_testing_group_remote.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/testing/test_testing_group_remote.c b/src/testing/test_testing_group_remote.c
index 6bcdb475d..f2ad8f3d3 100644
--- a/src/testing/test_testing_group_remote.c
+++ b/src/testing/test_testing_group_remote.c
@@ -40,6 +40,8 @@ static int ok;
40 40
41static int peers_left; 41static int peers_left;
42 42
43static int peers_failed;
44
43static struct GNUNET_TESTING_PeerGroup *pg; 45static struct GNUNET_TESTING_PeerGroup *pg;
44 46
45static struct GNUNET_SCHEDULER_Handle *sched; 47static struct GNUNET_SCHEDULER_Handle *sched;
@@ -55,13 +57,22 @@ my_cb (void *cls,
55 const struct GNUNET_CONFIGURATION_Handle *cfg, 57 const struct GNUNET_CONFIGURATION_Handle *cfg,
56 struct GNUNET_TESTING_Daemon *d, const char *emsg) 58 struct GNUNET_TESTING_Daemon *d, const char *emsg)
57{ 59{
58 GNUNET_assert (id != NULL); 60 if (emsg != NULL)
61 {
62 peers_failed++;
63 }
64
59 peers_left--; 65 peers_left--;
60 if (peers_left == 0) 66 if (peers_left == 0)
61 { 67 {
62 GNUNET_TESTING_daemons_stop (pg, TIMEOUT); 68 GNUNET_TESTING_daemons_stop (pg, TIMEOUT);
63 ok = 0; 69 ok = 0;
64 } 70 }
71 else if (failed_peers == peers_left)
72 {
73 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Too many peers failed, ending test!\n");
74 GNUNET_TESTING_daemons_stop (pg, TIMEOUT);
75 }
65} 76}
66 77
67 78