aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-04-27 10:48:50 +0000
committerNathan S. Evans <evans@in.tum.de>2010-04-27 10:48:50 +0000
commit30cd4ffedc991a35b84ed2c84f5a74b5b2d7322b (patch)
treeef1aa9998398d7358424ebbb601d245a12bb2329 /src
parent563e462888682fdea1d0532076d7ac9731777772 (diff)
downloadgnunet-30cd4ffedc991a35b84ed2c84f5a74b5b2d7322b.tar.gz
gnunet-30cd4ffedc991a35b84ed2c84f5a74b5b2d7322b.zip
less stressful testcases for slow machines (especially a certain sparc buildot)
Diffstat (limited to 'src')
-rw-r--r--src/testing/test_testing_connect.c2
-rw-r--r--src/testing/test_testing_group.c16
-rw-r--r--src/testing/test_testing_topology.c4
3 files changed, 15 insertions, 7 deletions
diff --git a/src/testing/test_testing_connect.c b/src/testing/test_testing_connect.c
index 60721298e..9dd07f993 100644
--- a/src/testing/test_testing_connect.c
+++ b/src/testing/test_testing_connect.c
@@ -24,7 +24,7 @@
24#include "platform.h" 24#include "platform.h"
25#include "gnunet_testing_lib.h" 25#include "gnunet_testing_lib.h"
26 26
27#define VERBOSE GNUNET_NO 27#define VERBOSE GNUNET_YES
28 28
29 29
30/** 30/**
diff --git a/src/testing/test_testing_group.c b/src/testing/test_testing_group.c
index 1f21b64f4..61ef82449 100644
--- a/src/testing/test_testing_group.c
+++ b/src/testing/test_testing_group.c
@@ -24,13 +24,14 @@
24#include "platform.h" 24#include "platform.h"
25#include "gnunet_testing_lib.h" 25#include "gnunet_testing_lib.h"
26 26
27#define VERBOSE GNUNET_NO 27#define VERBOSE GNUNET_YES
28 28
29#define NUM_PEERS 4
29 30
30/** 31/**
31 * How long until we give up on connecting the peers? 32 * How long until we give up on connecting the peers?
32 */ 33 */
33#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) 34#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 300)
34 35
35 36
36static int ok; 37static int ok;
@@ -48,10 +49,17 @@ my_cb (void *cls,
48 const struct GNUNET_CONFIGURATION_Handle *cfg, 49 const struct GNUNET_CONFIGURATION_Handle *cfg,
49 struct GNUNET_TESTING_Daemon *d, const char *emsg) 50 struct GNUNET_TESTING_Daemon *d, const char *emsg)
50{ 51{
51 GNUNET_assert (id != NULL); 52 if (id == NULL)
53 {
54 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Start callback called with error (too long starting peers), aborting test!\n");
55 GNUNET_TESTING_daemons_stop (pg);
56 ok = 7;
57 }
52 peers_left--; 58 peers_left--;
53 if (peers_left == 0) 59 if (peers_left == 0)
54 { 60 {
61 sleep(2); /* Give other services a chance to initialize before killing */
62 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All peers started successfully, ending test!\n");
55 GNUNET_TESTING_daemons_stop (pg); 63 GNUNET_TESTING_daemons_stop (pg);
56 ok = 0; 64 ok = 0;
57 } 65 }
@@ -69,7 +77,7 @@ run (void *cls,
69#if VERBOSE 77#if VERBOSE
70 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting daemons.\n"); 78 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting daemons.\n");
71#endif 79#endif
72 peers_left = 8; 80 peers_left = NUM_PEERS;
73 pg = GNUNET_TESTING_daemons_start (sched, cfg, 81 pg = GNUNET_TESTING_daemons_start (sched, cfg,
74 peers_left, 82 peers_left,
75 &my_cb, NULL, NULL, NULL, NULL); 83 &my_cb, NULL, NULL, NULL, NULL);
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c
index 334f1c78d..eae59913c 100644
--- a/src/testing/test_testing_topology.c
+++ b/src/testing/test_testing_topology.c
@@ -57,7 +57,7 @@ static unsigned int expected_messages;
57 57
58static unsigned int expected_connections; 58static unsigned int expected_connections;
59 59
60static int peers_left; 60static unsigned long long peers_left;
61 61
62static struct GNUNET_TESTING_PeerGroup *pg; 62static struct GNUNET_TESTING_PeerGroup *pg;
63 63
@@ -524,7 +524,7 @@ my_cb (void *cls,
524{ 524{
525 GNUNET_assert (id != NULL); 525 GNUNET_assert (id != NULL);
526#if VERBOSE 526#if VERBOSE
527 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Started daemon %d out of %d\n", 527 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Started daemon %llu out of %llu\n",
528 (num_peers - peers_left) + 1, num_peers); 528 (num_peers - peers_left) + 1, num_peers);
529#endif 529#endif
530 peers_left--; 530 peers_left--;