(no commit message)
authorMatthias Wachs <wachs@net.in.tum.de>
Fri, 22 Oct 2010 15:53:02 +0000 (15:53 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Fri, 22 Oct 2010 15:53:02 +0000 (15:53 +0000)
src/transport/Makefile.am
src/transport/test_quota_compliance.c

index 102bbb1c4041f988e2e6981aee7d2a8d193c0f9a..4813946c7af053a7078e8a630cc69ea3e54184b1 100644 (file)
@@ -200,7 +200,8 @@ check_PROGRAMS = \
  test_transport_api_reliability_tcp_nat \
  test_transport_api_reliability_udp \
  $(HTTP_REL_TEST) \
- $(HTTPS_REL_TEST)
+ $(HTTPS_REL_TEST) \
+  test_quota_compliance
 # TODO: add tests for nat, etc.
 
 if !DISABLE_TEST_RUN
@@ -216,7 +217,8 @@ TESTS = \
  test_transport_api_reliability_tcp \
  test_transport_api_reliability_tcp_nat \
  $(HTTP_REL_TEST) \
- $(HTTPS_REL_TEST)
+ $(HTTPS_REL_TEST) \
+ test_quota_compliance
 endif
 
 test_transport_api_tcp_SOURCES = \
@@ -303,6 +305,12 @@ test_transport_api_reliability_https_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
+test_quota_compliance_SOURCES = \
+ test_quota_compliance.c
+test_quota_compliance_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+
 endif
 
 EXTRA_DIST = \
@@ -324,4 +332,8 @@ EXTRA_DIST = \
   test_transport_api_rel_http_peer2.conf \
   test_transport_api_rel_https_peer1.conf \
   test_transport_api_rel_https_peer2.conf \
-  test_plugin_transport_data_http.conf
+  test_plugin_transport_data_http.conf \
+  test_plugin_transport_data.conf \
+  test_quota_compliance_data.conf \
+  test_quota_compliance_peer1.conf \
+  test_quota_compliance_peer2.conf
\ No newline at end of file
index e24a298d281e95034116efea5a76d341ddae0952..22519144a2a2039258ee88f2cac8647271a50386 100644 (file)
@@ -119,12 +119,12 @@ end ()
            measurement_counter_task = GNUNET_SCHEDULER_NO_TASK;
   }
   GNUNET_SCHEDULER_shutdown (sched);
-#if VERBOSE
+#if DEBUG_CONNECTIONS
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from transports!\n");
 #endif
   GNUNET_TRANSPORT_disconnect (p1.th);
   GNUNET_TRANSPORT_disconnect (p2.th);
-#if VERBOSE
+#if DEBUG_CONNECTIONS
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Transports disconnected, returning success!\n");
 #endif
@@ -334,7 +334,7 @@ static void measure (unsigned long long quota_p1, unsigned long long quota_p2 )
          current_quota_p2 = quota_p2;
 #if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Starting measurement: Duration: %u Quota: %u\n", MEASUREMENT_INTERVALL, current_quota_p1);
+              "Starting transport level measurement: Duration: %u Quota: %u\n", MEASUREMENT_INTERVALL, current_quota_p1);
 #endif
                GNUNET_TRANSPORT_set_quota (p1.th,
                          &p2.id,