-fix NPE
[oweals/gnunet.git] / src / transport / Makefile.am
index 83e820012b937557423bf741f60b26370eaf839e..001681181c346030e69dc8b412023595e1efd58e 100644 (file)
@@ -1,3 +1,4 @@
+# This Makefile.am is in the public domain
 AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include
 
 plugindir = $(libdir)/gnunet
@@ -94,9 +95,9 @@ endif
 
 if LINUX
 install-exec-hook:
-       $(top_srcdir)/src/transport/install-wlan-helper.sh $(libexecdir) $(SUDO_BINARY) || true
-if HAVE_LIBBLUETOOTH   
-       $(top_srcdir)/src/transport/install-bluetooth-helper.sh $(libexecdir) $(SUDO_BINARY) || true
+       $(top_srcdir)/src/transport/install-wlan-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
+if HAVE_LIBBLUETOOTH
+       $(top_srcdir)/src/transport/install-bluetooth-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
 endif
 else
 install-exec-hook:
@@ -164,9 +165,11 @@ libgnunettransport_la_SOURCES = \
   transport_api_blacklist.c \
   transport_api_address_to_string.c \
   transport_api_monitor_peers.c \
+  transport_api_monitor_plugins.c \
   transport_api_monitor_validation.c
 libgnunettransport_la_LIBADD = \
   $(top_builddir)/src/hello/libgnunethello.la \
+  $(top_builddir)/src/ats/libgnunetats.la \
   $(top_builddir)/src/util/libgnunetutil.la \
   $(GN_LIBINTL)
 libgnunettransport_la_LDFLAGS = \
@@ -239,6 +242,7 @@ gnunet_transport_LDADD = \
 
 gnunet_service_transport_SOURCES = \
  gnunet-service-transport.c gnunet-service-transport.h \
+ gnunet-service-transport_ats.h gnunet-service-transport_ats.c \
  gnunet-service-transport_blacklist.h gnunet-service-transport_blacklist.c \
  gnunet-service-transport_clients.h gnunet-service-transport_clients.c \
  gnunet-service-transport_hello.h gnunet-service-transport_hello.c \
@@ -274,7 +278,11 @@ plugin_LTLIBRARIES = \
   $(HTTP_SERVER_PLUGIN_LA) \
   $(HTTPS_SERVER_PLUGIN_LA) \
   $(WLAN_PLUGIN_LA) \
-  $(BT_PLUGIN_LA) \
+  $(BT_PLUGIN_LA)
+
+# Note: real plugins of course need to be added
+# to the plugin_LTLIBRARIES above
+noinst_LTLIBRARIES = \
   libgnunet_plugin_transport_template.la
 
 libgnunet_plugin_transport_tcp_la_SOURCES = \
@@ -414,6 +422,9 @@ libgnunet_plugin_transport_https_server_la_CFLAGS = \
 
 if HAVE_TESTING
 check_PROGRAMS = \
+ test_transport_api_restart_2peers \
+ test_transport_address_switch_tcp \
+ test_transport_address_switch_udp \
  test_transport_testing_startstop \
  test_transport_testing_restart \
  test_transport_testing \
@@ -433,14 +444,11 @@ check_PROGRAMS = \
  test_transport_api_bidirectional_connect \
  test_transport_api_tcp \
  test_transport_api_restart_1peer \
- test_transport_api_restart_2peers \
  test_transport_api_timeout_tcp \
- test_transport_address_switch_tcp \
  test_transport_api_limited_sockets_tcp \
  test_transport_api_tcp_nat \
  test_transport_api_udp \
  test_transport_api_timeout_udp \
- test_transport_address_switch_udp \
  $(UNIX_PLUGIN_TEST) \
  $(UNIX_PLUGIN_TIMEOUT_TEST) \
  $(UNIX_API_ABSTRACT_TEST) \
@@ -486,6 +494,10 @@ check_PROGRAMS = \
  $(HTTPS_QUOTA_TEST) \
  $(WLAN_QUOTA_TEST) \
  $(BT_QUOTA_TEST)
+if HAVE_GETOPT_BINARY
+check_PROGRAMS += \
+test_transport_api_slow_ats
+endif
 endif
 
 if ENABLE_TEST_RUN
@@ -506,27 +518,16 @@ TESTS = \
  test_transport_api_tcp \
  test_transport_api_restart_1peer \
  test_transport_api_restart_2peers \
- test_transport_api_timeout_tcp \
  test_transport_api_limited_sockets_tcp \
  test_transport_api_tcp_nat \
- test_transport_address_switch_tcp \
  test_transport_api_udp \
- test_transport_api_timeout_udp \
- test_transport_address_switch_udp \
  $(UNIX_PLUGIN_TEST) \
- $(UNIX_PLUGIN_TIMEOUT_TEST) \
  $(UNIX_API_ABSTRACT_TEST) \
  test_transport_api_udp_nat \
  $(HTTP_API_TEST) \
- $(HTTP_API_TIMEOUT_TEST) \
- $(HTTP_SWITCH) \
  $(HTTPS_API_TEST) \
- $(HTTPS_API_TIMEOUT_TEST) \
- $(HTTPS_SWITCH) \
  $(WLAN_API_TEST) \
- $(WLAN_TIMEOUT_TEST) \
  $(BT_API_TEST) \
- $(BT_TIMEOUT_TEST) \
  test_transport_api_multi \
  test_transport_api_monitor_peers \
  test_transport_api_monitor_validation \
@@ -554,7 +555,22 @@ TESTS = \
  test_quota_compliance_udp \
  $(UNIX_QUOTA_TEST) \
  $(HTTP_QUOTA_TEST) \
- $(HTTPS_QUOTA_TEST)
+ $(HTTPS_QUOTA_TEST) \
+ test_transport_api_timeout_tcp \
+ test_transport_api_timeout_udp \
+ $(UNIX_PLUGIN_TIMEOUT_TEST) \
+ $(HTTP_API_TIMEOUT_TEST) \
+ $(HTTPS_API_TIMEOUT_TEST) \
+ $(WLAN_TIMEOUT_TEST) \
+ $(BT_TIMEOUT_TEST) \
+ test_transport_address_switch_tcp \
+ test_transport_address_switch_udp \
+ $(HTTP_SWITCH) \
+ $(HTTPS_SWITCH)
+if HAVE_GETOPT_BINARY
+TESTS += \
+test_transport_api_slow_ats
+endif
 endif
 
 test_transport_testing_startstop_SOURCES = \
@@ -977,6 +993,7 @@ test_quota_compliance_http_SOURCES = \
 test_quota_compliance_http_LDADD = \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -985,6 +1002,7 @@ test_quota_compliance_http_asymmetric_SOURCES = \
 test_quota_compliance_http_asymmetric_LDADD = \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -993,6 +1011,7 @@ test_quota_compliance_https_SOURCES = \
 test_quota_compliance_https_LDADD = \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -1001,6 +1020,7 @@ test_quota_compliance_https_asymmetric_SOURCES = \
 test_quota_compliance_https_asymmetric_LDADD = \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -1118,6 +1138,7 @@ test_quota_compliance_tcp_SOURCES = \
 test_quota_compliance_tcp_LDADD = \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -1126,6 +1147,7 @@ test_quota_compliance_tcp_asymmetric_SOURCES = \
 test_quota_compliance_tcp_asymmetric_LDADD = \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -1134,6 +1156,7 @@ test_quota_compliance_udp_SOURCES = \
 test_quota_compliance_udp_LDADD = \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -1142,6 +1165,7 @@ test_quota_compliance_unix_SOURCES = \
 test_quota_compliance_unix_LDADD = \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -1150,6 +1174,7 @@ test_quota_compliance_unix_asymmetric_SOURCES = \
 test_quota_compliance_unix_asymmetric_LDADD = \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -1158,6 +1183,7 @@ test_quota_compliance_wlan_SOURCES = \
 test_quota_compliance_wlan_LDADD = \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -1166,6 +1192,7 @@ test_quota_compliance_wlan_asymmetric_SOURCES = \
 test_quota_compliance_wlan_asymmetric_LDADD = \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -1175,6 +1202,7 @@ test_quota_compliance_bluetooth_LDADD = \
  $(top_builddir)/src/nat/libgnunetnat.la \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -1183,6 +1211,7 @@ test_quota_compliance_bluetooth_asymmetric_SOURCES = \
 test_quota_compliance_bluetooth_asymmetric_LDADD = \
  libgnunettransport.la \
  $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/ats/libgnunetats.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
@@ -1210,10 +1239,19 @@ test_transport_api_monitor_validation_LDADD = \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettransporttesting.la
 
+test_transport_api_slow_ats_SOURCES = \
+ test_transport_api.c
+test_transport_api_slow_ats_LDADD = \
+ libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/util/libgnunetutil.la  \
+ libgnunettransporttesting.la
+
 
 EXTRA_DIST = \
 test_plugin_hostkey \
 test_plugin_hostkey.ecc \
+test_delay \
 template_cfg_peer1.conf\
 template_cfg_peer2.conf\
 test_plugin_transport_data.conf\
@@ -1298,20 +1336,18 @@ test_transport_api_timeout_bluetooth_peer1.conf\
 test_transport_api_timeout_bluetooth_peer2.conf\
 test_transport_api_reliability_udp_peer1.conf\
 test_transport_api_reliability_udp_peer2.conf\
+test_transport_api_reliability_http_xhr_peer1.conf\
+test_transport_api_reliability_http_xhr_peer2.conf\
+test_transport_api_reliability_https_xhr_peer1.conf\
+test_transport_api_reliability_https_xhr_peer2.conf\
 test_transport_api_reliability_unix_peer1.conf\
 test_transport_api_reliability_unix_peer2.conf\
 test_transport_api_reliability_wlan_peer1.conf\
 test_transport_api_reliability_wlan_peer2.conf\
+test_transport_api_unreliability_wlan_peer1.conf\
+test_transport_api_unreliability_wlan_peer2.conf\
 test_transport_api_reliability_bluetooth_peer1.conf\
 test_transport_api_reliability_bluetooth_peer2.conf\
-test_transport_test_transport_address_switch_http_peer1.conf\
-test_transport_test_transport_address_switch_http_peer2.conf\
-test_transport_test_transport_address_switch_https_peer1.conf\
-test_transport_test_transport_address_switch_https_peer2.conf\
-test_transport_test_transport_address_switch_udp_peer1.conf\
-test_transport_test_transport_address_switch_udp_peer2.conf\
-test_transport_test_transport_address_switch_tcp_peer1.conf\
-test_transport_test_transport_address_switch_tcp_peer2.conf\
 test_transport_api_wlan_peer1.conf\
 test_transport_api_wlan_peer2.conf\
 test_transport_api_bluetooth_peer1.conf\
@@ -1339,5 +1375,6 @@ test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf \
 test_transport_api_http_reverse_peer1.conf \
 test_transport_api_http_reverse_peer2.conf \
 perf_tcp_peer1.conf \
-perf_tcp_peer2.conf
-
+perf_tcp_peer2.conf \
+test_transport_api_slow_ats_peer1.conf \
+test_transport_api_slow_ats_peer2.conf