[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r23899 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r23899 - gnunet/src/mesh |
Date: |
Wed, 19 Sep 2012 11:52:36 +0200 |
Author: bartpolot
Date: 2012-09-19 11:52:36 +0200 (Wed, 19 Sep 2012)
New Revision: 23899
Modified:
gnunet/src/mesh/Makefile.am
gnunet/src/mesh/test_mesh_small.c
Log:
- add min and nobuf options to tests
Modified: gnunet/src/mesh/Makefile.am
===================================================================
--- gnunet/src/mesh/Makefile.am 2012-09-19 09:35:33 UTC (rev 23898)
+++ gnunet/src/mesh/Makefile.am 2012-09-19 09:52:36 UTC (rev 23899)
@@ -99,6 +99,8 @@
test_mesh_small_unicast \
test_mesh_small_multicast \
test_mesh_small_speed \
+ test_mesh_small_speed_nobuf \
+ test_mesh_small_speed_min \
test_mesh_small_speed_ack
test_mesh_api_SOURCES = \
@@ -209,6 +211,24 @@
test_mesh_small_speed_DEPENDENCIES = \
libgnunetmesh.la
+test_mesh_small_speed_min_SOURCES = \
+ test_mesh_small.c
+test_mesh_small_speed_min_LDADD = \
+ $(top_builddir)/src/mesh/libgnunetmesh.la \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/testing_old/libgnunettesting_old.la
+test_mesh_small_speed_min_DEPENDENCIES = \
+ libgnunetmesh.la
+
+test_mesh_small_speed_nobuf_SOURCES = \
+ test_mesh_small.c
+test_mesh_small_speed_nobuf_LDADD = \
+ $(top_builddir)/src/mesh/libgnunetmesh.la \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/testing_old/libgnunettesting_old.la
+test_mesh_small_speed_nobuf_DEPENDENCIES = \
+ libgnunetmesh.la
+
test_mesh_small_speed_ack_SOURCES = \
test_mesh_small.c
test_mesh_small_speed_ack_LDADD = \
Modified: gnunet/src/mesh/test_mesh_small.c
===================================================================
--- gnunet/src/mesh/test_mesh_small.c 2012-09-19 09:35:33 UTC (rev 23898)
+++ gnunet/src/mesh/test_mesh_small.c 2012-09-19 09:52:36 UTC (rev 23899)
@@ -62,6 +62,8 @@
#define MULTICAST 2
#define SPEED 3
#define SPEED_ACK 4
+#define SPEED_MIN 5
+#define SPEED_NOBUF 6
/**
* Which test are we running?
@@ -688,6 +690,16 @@
&tunnel_cleaner, handlers, &app);
}
t = GNUNET_MESH_tunnel_create (h1, NULL, &ch, &dh, (void *) 1L);
+ if (SPEED_MIN == test)
+ {
+ GNUNET_MESH_tunnel_speed_min(t);
+ test = SPEED;
+ }
+ if (SPEED_NOBUF == test)
+ {
+ GNUNET_MESH_tunnel_buffer(t, GNUNET_NO);
+ test = SPEED;
+ }
peers_in_tunnel = 0;
test_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
@@ -990,8 +1002,13 @@
* _________________________________
*/
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "SPEED\n");
- test = SPEED;
ok_goal = 1004;
+ if (strstr (argv[0], "_min") != NULL)
+ test = SPEED_MIN;
+ else if (strstr (argv[0], "_nobuf") != NULL)
+ test = SPEED_NOBUF;
+ else
+ test = SPEED;
}
else
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r23899 - gnunet/src/mesh,
gnunet <=