http test not built if plugin not
[oweals/gnunet.git] / src / transport / Makefile.am
index 3745180ff29257bf21a18153ad5c8cf3f6ee573a..a6bf2de9d787d2f2ddd4af113479437bdf502038 100644 (file)
@@ -6,10 +6,12 @@ if MINGW
   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
 endif
 
-if HAVE_MHD 
+if HAVE_MHD
  GN_LIBMHD = -lmicrohttpd
  HTTP_PLUGIN_LA = libgnunet_plugin_transport_http.la
- HTTP_PLGUIN_CHECK = test_plugin_transport_http
+ HTTP_PLUGIN_CHECK = test_plugin_transport_http \
+                     test_transport_api_http \
+                     test_plugin_transport_reliability_http
 endif
 
 if USE_COVERAGE
@@ -34,7 +36,6 @@ libgnunettransport_la_SOURCES = \
   transport_api_blacklist.c \
   transport_api_address_lookup.c 
 libgnunettransport_la_LIBADD = \
-  $(top_builddir)/src/arm/libgnunetarm.la \
   $(top_builddir)/src/hello/libgnunethello.la \
   $(top_builddir)/src/util/libgnunetutil.la \
   $(GN_LIBINTL) 
@@ -54,7 +55,6 @@ gnunet_nat_server_SOURCES = \
 gnunet_nat_client_SOURCES = \
  gnunet-nat-client.c         
 
-
 gnunet_transport_SOURCES = \
  gnunet-transport.c         
 gnunet_transport_LDADD = \
@@ -65,6 +65,7 @@ gnunet_transport_LDADD = \
 gnunet_service_transport_SOURCES = \
  gnunet-service-transport.c plugin_transport.h 
 gnunet_service_transport_LDADD = \
+  $(top_builddir)/src/hello/libgnunethello.la \
   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
   $(top_builddir)/src/statistics/libgnunetstatistics.la \
   $(top_builddir)/src/util/libgnunetutil.la \
@@ -74,10 +75,9 @@ gnunet_service_transport_LDADD = \
 plugin_LTLIBRARIES = \
   libgnunet_plugin_transport_tcp.la \
   libgnunet_plugin_transport_udp.la \
-  libgnunet_plugin_transport_udp_nat.la \
   $(HTTP_PLUGIN_LA) \
   libgnunet_plugin_transport_template.la
-# TODO: add http, nat, etc.
+# TODO: add nat, etc.
 
 libgnunet_plugin_transport_tcp_la_SOURCES = \
   plugin_transport_tcp.c
@@ -106,15 +106,15 @@ libgnunet_plugin_transport_udp_la_LIBADD = \
 libgnunet_plugin_transport_udp_la_LDFLAGS = \
  $(GN_PLUGIN_LDFLAGS)
 
-libgnunet_plugin_transport_udp_nat_la_SOURCES = \
-  plugin_transport_udp_nat.c
-libgnunet_plugin_transport_udp_nat_la_LIBADD = \
-  $(top_builddir)/src/hello/libgnunethello.la \
-  $(top_builddir)/src/statistics/libgnunetstatistics.la \
-  $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
-  $(top_builddir)/src/util/libgnunetutil.la 
-libgnunet_plugin_transport_udp_nat_la_LDFLAGS = \
- $(GN_PLUGIN_LDFLAGS)
+#libgnunet_plugin_transport_udp_nat_la_SOURCES = \
+#  plugin_transport_udp_nat.c
+#libgnunet_plugin_transport_udp_nat_la_LIBADD = \
+#  $(top_builddir)/src/hello/libgnunethello.la \
+#  $(top_builddir)/src/statistics/libgnunetstatistics.la \
+#  $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
+#  $(top_builddir)/src/util/libgnunetutil.la 
+#libgnunet_plugin_transport_udp_nat_la_LDFLAGS = \
+# $(GN_PLUGIN_LDFLAGS)
 
 if HAVE_MHD 
 libgnunet_plugin_transport_http_la_SOURCES = \
@@ -129,16 +129,26 @@ libgnunet_plugin_transport_http_la_LDFLAGS = \
  $(GN_LIBMHD) \
  $(GN_PLUGIN_LDFLAGS)
 endif
+
 check_PROGRAMS = \
  test_transport_api_tcp \
+ test_transport_api_tcp_nat \
  test_transport_api_udp \
- $(HTTP_PLGUIN_CHECK) \
- test_transport_api_udp_nat
-# test_transport_api_http \
-# TODO: add tests for http, nat, etc.
-
-TESTS = $(check_PROGRAMS)
+ $(HTTP_PLUGIN_CHECK) \
+ test_transport_api_udp_nat \
+ test_transport_api_reliability_tcp \
+ test_transport_api_reliability_tcp_nat \
+ test_transport_api_reliability_udp
+# TODO: add tests for nat, etc.
+
+TESTS = \
+ test_transport_api_tcp \
+ test_transport_api_tcp_nat \
+ test_transport_api_udp \
+ test_transport_api_udp_nat \
+ $(HTTP_PLUGIN_CHECK) \
+ test_transport_api_reliability_tcp \
+ test_transport_api_reliability_tcp_nat
 
 test_transport_api_tcp_SOURCES = \
  test_transport_api.c
@@ -146,6 +156,30 @@ test_transport_api_tcp_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 
+test_transport_api_tcp_nat_SOURCES = \
+ test_transport_api.c
+test_transport_api_tcp_nat_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la  
+
+test_transport_api_reliability_tcp_SOURCES = \
+ test_transport_api_reliability.c
+test_transport_api_reliability_tcp_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la  
+
+test_transport_api_reliability_tcp_nat_SOURCES = \
+ test_transport_api_reliability.c
+test_transport_api_reliability_tcp_nat_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la 
+
+test_transport_api_reliability_udp_SOURCES = \
+ test_transport_api_reliability.c
+test_transport_api_reliability_udp_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la   
+
 test_transport_api_udp_SOURCES = \
  test_transport_api.c
 test_transport_api_udp_LDADD = \
@@ -157,12 +191,13 @@ test_transport_api_udp_nat_SOURCES = \
 test_transport_api_udp_nat_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
  $(top_builddir)/src/util/libgnunetutil.la  
-#test_transport_api_http_SOURCES = \
-# test_transport_api.c
-#test_transport_api_http_LDADD = \
-# $(top_builddir)/src/transport/libgnunettransport.la \
-# $(top_builddir)/src/util/libgnunetutil.la  
+
+if HAVE_MHD
+test_transport_api_http_SOURCES = \
+ test_transport_api.c
+test_transport_api_http_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la  
 
 test_plugin_transport_http_SOURCES = \
  test_plugin_transport_http.c
@@ -172,6 +207,12 @@ test_plugin_transport_http_LDADD = \
  @LIBCURL@ \
  $(top_builddir)/src/util/libgnunetutil.la  
 
+test_transport_api_reliability_http_SOURCES = \
+ test_transport_api_reliability.c
+test_transport_api_reliability_http_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la   
+endif
 
 EXTRA_DIST = \
   test_transport_api_data.conf \
@@ -181,5 +222,11 @@ EXTRA_DIST = \
   test_transport_api_udp_peer2.conf \
   test_transport_api_udp_nat_peer1.conf \
   test_transport_api_udp_nat_peer2.conf \
+  test_transport_api_tcp_nat_peer1.conf \
+  test_transport_api_tcp_nat_peer2.conf \
   test_plugin_transport_data.conf \
+  test_transport_api_http_peer1.conf \
+  test_transport_api_http_peer2.conf \
+  test_transport_api_rel_http_peer1.conf \
+  test_transport_api_rel_http_peer2.conf \
   test_plugin_transport_data_http.conf