diff options
author | David Barksdale <amatus.amongus@gmail.com> | 2013-06-27 06:11:55 +0000 |
---|---|---|
committer | David Barksdale <amatus.amongus@gmail.com> | 2013-06-27 06:11:55 +0000 |
commit | ea7eed529e12dcbed6a6775b818d8b93b9505f18 (patch) | |
tree | 521ba312e1268d1afb249db03c1b97d5a79181a1 /src | |
parent | 48e50f64d8c05b2a6dab327156ea86fc92f171cf (diff) |
Make building gnunet-testing lib optional.
This is all because emscripten doesn't have getaddrinfo.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 13 | ||||
-rw-r--r-- | src/ats/Makefile.am | 16 | ||||
-rw-r--r-- | src/core/Makefile.am | 6 | ||||
-rw-r--r-- | src/datacache/Makefile.am | 2 | ||||
-rw-r--r-- | src/datastore/Makefile.am | 6 | ||||
-rw-r--r-- | src/dht/Makefile.am | 5 | ||||
-rw-r--r-- | src/dv/Makefile.am | 3 | ||||
-rw-r--r-- | src/fs/Makefile.am | 6 | ||||
-rw-r--r-- | src/gns/Makefile.am | 3 | ||||
-rw-r--r-- | src/lockmanager/Makefile.am | 4 | ||||
-rw-r--r-- | src/mesh/Makefile.am | 6 | ||||
-rw-r--r-- | src/namestore/Makefile.am | 26 | ||||
-rw-r--r-- | src/nse/Makefile.am | 5 | ||||
-rw-r--r-- | src/peerinfo/Makefile.am | 2 | ||||
-rw-r--r-- | src/pt/Makefile.am | 2 | ||||
-rw-r--r-- | src/regex/Makefile.am | 3 | ||||
-rw-r--r-- | src/set/Makefile.am | 2 | ||||
-rw-r--r-- | src/stream/Makefile.am | 4 | ||||
-rw-r--r-- | src/topology/Makefile.am | 3 | ||||
-rw-r--r-- | src/transport/Makefile.am | 8 | ||||
-rw-r--r-- | src/util/Makefile.am | 6 | ||||
-rw-r--r-- | src/util/test_mq.c | 1 |
22 files changed, 101 insertions, 31 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 22b24b9bf7..d3bd856e99 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,8 +2,15 @@ # INTLEMU_SUBDIRS = intlemu #endif +if HAVE_TESTING + TESTING = testing + TESTBED = testbed + CONSENSUS = consensus + EXPERIMENTATION = experimentation +endif + if HAVE_EXPERIMENTAL - EXP_DIR = gns set dv consensus experimentation + EXP_DIR = gns set dv $(CONSENSUS) $(EXPERIMENTATION) endif if LINUX @@ -31,7 +38,7 @@ SUBDIRS = \ block \ statistics \ arm \ - testing \ + $(TESTING) \ peerinfo \ $(MYSQL_DIR) \ $(POSTGRES_DIR) \ @@ -46,7 +53,7 @@ SUBDIRS = \ ats-tool \ peerinfo-tool \ core \ - testbed \ + $(TESTBED) \ nse \ dht \ hostlist \ diff --git a/src/ats/Makefile.am b/src/ats/Makefile.am index 3f51e3cca5..aff96a7801 100644 --- a/src/ats/Makefile.am +++ b/src/ats/Makefile.am @@ -60,7 +60,8 @@ gnunet_service_ats_LDADD = \ gnunet_service_ats_DEPENDENCIES = \ libgnunetats.la -check_PROGRAMS = \ +if HAVE_TESTING +TESTING_TESTS = \ test_ats_api_scheduling_init \ test_ats_api_scheduling_add_address \ test_ats_api_scheduling_add_session \ @@ -71,17 +72,22 @@ check_PROGRAMS = \ test_ats_api_scheduling_destroy_session \ test_ats_api_scheduling_destroy_inbound_connection \ test_ats_api_scheduling_block_and_reset \ - test_ats_normalization_update_quality \ + test_ats_normalization_update_quality \ test_ats_change_preference \ test_ats_simplistic \ test_ats_simplistic_switch_networks \ test_ats_simplistic_change_preference \ test_ats_api_performance_list_addresses \ - test_ats_api_performance_address_info \ - $(GN_MLP_TEST) $(GN_MLP_PERF) $(GN_MLP_TEST_UPDATE) -# $(GN_MLP_TEST_AVG) + test_ats_api_performance_address_info # test_ats_api_scheduling_get_type # test_ats_api_bandwidth_consumption +# test_ats_simplistic_pref_aging +endif + +check_PROGRAMS = \ + $(TESTING_TESTS) + $(GN_MLP_TEST) $(GN_MLP_PERF) $(GN_MLP_TEST_UPDATE) +# $(GN_MLP_TEST_AVG) if ENABLE_TEST_RUN TESTS = $(check_PROGRAMS) diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 7e4cd7f542..ebe1ae1ce1 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -60,6 +60,10 @@ gnunet_core_LDADD = \ gnunet_core_DEPENDENCIES = \ libgnunetcore.la +if HAVE_TESTING + TESTING_TESTS = test_core_api_send_to_self +endif + check_PROGRAMS = \ test_core_api_start_only \ test_core_api \ @@ -67,7 +71,7 @@ check_PROGRAMS = \ test_core_quota_compliance_symmetric \ test_core_quota_compliance_asymmetric_send_limited \ test_core_quota_compliance_asymmetric_recv_limited \ - test_core_api_send_to_self + $(TESTING_TESTS) if ENABLE_TEST_RUN TESTS = $(check_PROGRAMS) diff --git a/src/datacache/Makefile.am b/src/datacache/Makefile.am index c6c27b3275..e8583aacb1 100644 --- a/src/datacache/Makefile.am +++ b/src/datacache/Makefile.am @@ -83,6 +83,7 @@ libgnunet_plugin_datacache_template_la_LDFLAGS = \ $(GN_PLUGIN_LDFLAGS) +if HAVE_TESTING if HAVE_SQLITE if HAVE_BENCHMARKS SQLITE_BENCHMARKS = \ @@ -113,6 +114,7 @@ POSTGRES_TESTS = \ test_datacache_quota_postgres \ $(POSTGRES_BENCHMARKS) endif +endif check_PROGRAMS = \ $(SQLITE_TESTS) \ diff --git a/src/datastore/Makefile.am b/src/datastore/Makefile.am index b54fef7928..a95a162b65 100644 --- a/src/datastore/Makefile.am +++ b/src/datastore/Makefile.am @@ -57,6 +57,7 @@ gnunet_datastore_DEPENDENCIES = \ if HAVE_MYSQL MYSQL_PLUGIN = libgnunet_plugin_datastore_mysql.la +if HAVE_TESTING if HAVE_BENCHMARKS MYSQL_BENCHMARKS = \ perf_datastore_api_mysql \ @@ -68,8 +69,10 @@ endif test_plugin_datastore_mysql \ $(MYSQL_BENCHMARKS) endif +endif if HAVE_SQLITE SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la +if HAVE_TESTING if HAVE_BENCHMARKS SQLITE_BENCHMARKS = \ perf_datastore_api_sqlite \ @@ -81,8 +84,10 @@ endif test_plugin_datastore_sqlite \ $(SQLITE_BENCHMARKS) endif +endif if HAVE_POSTGRES POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la +if HAVE_TESTING if HAVE_BENCHMARKS POSTGRES_BENCHMARKS = \ perf_datastore_api_postgres \ @@ -94,6 +99,7 @@ endif test_plugin_datastore_postgres \ $(POSTGRES_BENCHMARKS) endif +endif plugin_LTLIBRARIES = \ $(SQLITE_PLUGIN) \ diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am index 3059317286..0ed649bf5e 100644 --- a/src/dht/Makefile.am +++ b/src/dht/Makefile.am @@ -104,8 +104,9 @@ gnunet_dht_monitor_LDADD = \ gnunet_dht_monitor_DEPENDENCIES = \ libgnunetdht.la - +if HAVE_TESTING noinst_LIBRARIES = libgnunetdhttest.a +endif libgnunetdhttest_a_SOURCES = \ dht_test_lib.c dht_test_lib.h @@ -116,6 +117,7 @@ libgnunetdhttest_a_LIBADD = \ libgnunetdhttest_a_DEPENDENCIES = \ libgnunetdht.la +if HAVE_TESTING check_PROGRAMS = \ test_dht_api \ test_dht_twopeer \ @@ -123,6 +125,7 @@ check_PROGRAMS = \ test_dht_line \ test_dht_2dtorus \ test_dht_monitor +endif if HAVE_EXPERIMENTAL # These tests still do not work as testbed does diff --git a/src/dv/Makefile.am b/src/dv/Makefile.am index 1b90c2cc85..72e8fa4a85 100644 --- a/src/dv/Makefile.am +++ b/src/dv/Makefile.am @@ -65,10 +65,11 @@ libgnunet_plugin_transport_dv_la_LDFLAGS = \ libgnunet_plugin_transport_dv_la_DEPENDENCIES = \ libgnunetdv.la +if HAVE_TESTING check_PROGRAMS = \ test_transport_blacklist \ test_transport_dv - +endif if ENABLE_TEST_RUN TESTS = $(check_PROGRAMS) diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index f0fa73143e..a0d88051a0 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am @@ -24,7 +24,9 @@ lib_LTLIBRARIES = libgnunetfs.la plugin_LTLIBRARIES = \ libgnunet_plugin_block_fs.la +if HAVE_TESTING noinst_LIBRARIES = libgnunetfstest.a +endif libgnunetfs_la_SOURCES = \ fs_api.c fs_api.h fs.h \ @@ -66,9 +68,11 @@ libexec_PROGRAMS = \ gnunet-helper-fs-publish \ gnunet-service-fs +if HAVE_TESTING noinst_PROGRAMS = \ gnunet-fs-profiler \ gnunet-daemon-fsprofiler +endif bin_PROGRAMS = \ gnunet-auto-share \ @@ -235,6 +239,7 @@ if HAVE_BENCHMARKS perf_gnunet_service_fs_p2p_respect endif +if HAVE_TESTING check_PROGRAMS = \ test_plugin_block_fs \ test_fs_directory \ @@ -262,6 +267,7 @@ check_PROGRAMS = \ test_gnunet_service_fs_p2p \ test_gnunet_service_fs_p2p_mesh \ $(FS_BENCHMARKS) +endif test_plugin_block_fs_SOURCES = \ test_plugin_block_fs.c diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 852f7ff6a5..b0edaff498 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am @@ -208,7 +208,7 @@ libgnunet_plugin_block_gns_la_DEPENDENCIES = \ $(top_builddir)/src/block/libgnunetblock.la \ $(top_builddir)/src/namestore/libgnunetnamestore.la - +if HAVE_TESTING check_PROGRAMS = \ test_gns_simple_shorten \ test_gns_simple_get_authority \ @@ -225,6 +225,7 @@ check_PROGRAMS = \ test_gns_revocation \ test_gns_dht_three_peers #test_gns_proxy +endif if ENABLE_TEST_RUN if LINUX diff --git a/src/lockmanager/Makefile.am b/src/lockmanager/Makefile.am index 6a41fe5c14..9b03916451 100644 --- a/src/lockmanager/Makefile.am +++ b/src/lockmanager/Makefile.am @@ -40,11 +40,13 @@ libgnunetlockmanager_la_LDFLAGS = \ $(GN_LIB_LDFLAGS) $(WINFLAGS) \ -version-info 0:0:0 +if HAVE_TESTING check_PROGRAMS = \ test_lockmanager_api \ test_lockmanager_api_lockrelease \ test_lockmanager_api_servercrash \ test_lockmanager_api_acquireretry +endif EXTRA_DIST = \ test_lockmanager_api.conf @@ -79,4 +81,4 @@ test_lockmanager_api_acquireretry_SOURCES = \ test_lockmanager_api_acquireretry_LDADD = \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/testing/libgnunettesting.la \ - libgnunetlockmanager.la
\ No newline at end of file + libgnunetlockmanager.la diff --git a/src/mesh/Makefile.am b/src/mesh/Makefile.am index 5a51073e8c..37e9b03eff 100644 --- a/src/mesh/Makefile.am +++ b/src/mesh/Makefile.am @@ -125,8 +125,9 @@ if LINUX gnunet_service_mesh_new_LDFLAGS = -lrt endif - +if HAVE_TESTING noinst_LIBRARIES = libgnunetmeshtest.a $(noinst_LIB_EXP) +endif libgnunetmeshtest_a_SOURCES = \ mesh_test_lib.c mesh_test_lib.h @@ -146,7 +147,7 @@ libgnunetmesh2test_a_LIBADD = \ libgnunetmesh2test_a_DEPENDENCIES = \ libgnunetmesh2.la - +if HAVE_TESTING check_PROGRAMS = \ test_mesh_api \ test_mesh_tree_api \ @@ -164,6 +165,7 @@ check_PROGRAMS = \ test_mesh_small_speed_nobuf_backwards \ test_mesh_small_speed_ack \ $(EXP_TESTS) +endif test_mesh_api_SOURCES = \ test_mesh_api.c diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am index 1d36fe7923..df16e04bde 100644 --- a/src/namestore/Makefile.am +++ b/src/namestore/Makefile.am @@ -21,19 +21,18 @@ endif if HAVE_SQLITE SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la +if HAVE_TESTING SQLITE_TESTS = test_plugin_namestore_sqlite endif +endif if HAVE_POSTGRES -POSTGRES_TESTS = test_plugin_namestore_postgres POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la +if HAVE_TESTING +POSTGRES_TESTS = test_plugin_namestore_postgres endif - -if HAVE_SQLITE -check_PROGRAMS = \ - $(SQLITE_TESTS) \ - $(POSTGRES_TESTS) \ - test_namestore_record_serialization \ - test_namestore_api_sign_verify \ +endif +if HAVE_TESTING +TESTING_TESTS = \ test_namestore_api \ test_namestore_api_put \ test_namestore_api_lookup \ @@ -45,7 +44,16 @@ check_PROGRAMS = \ test_namestore_api_zone_to_name \ test_namestore_api_zone_iteration \ test_namestore_api_zone_iteration_specific_zone \ - test_namestore_api_zone_iteration_stop + test_namestore_api_zone_iteration_stop +endif + +if HAVE_SQLITE +check_PROGRAMS = \ + $(SQLITE_TESTS) \ + $(POSTGRES_TESTS) \ + $(TESTING_TESTS) \ + test_namestore_record_serialization \ + test_namestore_api_sign_verify endif if ENABLE_TEST_RUN diff --git a/src/nse/Makefile.am b/src/nse/Makefile.am index 80886433ad..728f23935d 100644 --- a/src/nse/Makefile.am +++ b/src/nse/Makefile.am @@ -32,8 +32,10 @@ libgnunetnse_la_LDFLAGS = \ libexec_PROGRAMS = \ gnunet-service-nse +if HAVE_TESTING noinst_PROGRAMS = \ gnunet-nse-profiler +endif gnunet_nse_profiler_SOURCES = \ gnunet-nse-profiler.c @@ -69,11 +71,12 @@ if HAVE_BENCHMARKS MULTIPEER_TEST = test_nse_multipeer endif +if HAVE_TESTING check_PROGRAMS = \ test_nse_api \ perf_kdf \ $(MULTIPEER_TEST) - +endif if ENABLE_TEST_RUN TESTS = $(check_PROGRAMS) diff --git a/src/peerinfo/Makefile.am b/src/peerinfo/Makefile.am index c3863ab653..59a0bddc51 100644 --- a/src/peerinfo/Makefile.am +++ b/src/peerinfo/Makefile.am @@ -46,12 +46,14 @@ if HAVE_BENCHMARKS perf_peerinfo_api endif +if HAVE_TESTING check_PROGRAMS = \ test_peerinfo_shipped_hellos \ test_peerinfo_api \ test_peerinfo_api_friend_only \ test_peerinfo_api_notify_friend_only \ $(PEERINFO_BENCHMARKS) +endif if ENABLE_TEST_RUN TESTS = $(check_PROGRAMS) diff --git a/src/pt/Makefile.am b/src/pt/Makefile.am index a9ae4fa5ed..e5673fe24f 100644 --- a/src/pt/Makefile.am +++ b/src/pt/Makefile.am @@ -31,6 +31,7 @@ gnunet_daemon_pt_LDADD = \ $(top_builddir)/src/util/libgnunetutil.la \ $(GN_LIBINTL) +if HAVE_TESTING if HAVE_MHD if HAVE_LIBCURL if LINUX @@ -50,6 +51,7 @@ if MINGW endif endif endif +endif check_PROGRAMS = $(VPN_TEST) diff --git a/src/regex/Makefile.am b/src/regex/Makefile.am index fac89e38db..b09413565e 100644 --- a/src/regex/Makefile.am +++ b/src/regex/Makefile.am @@ -108,11 +108,12 @@ libgnunetregextest_a_LIBADD = \ libgnunetregextest_a_DEPENDENCIES = \ libgnunetregex_internal.a - +if HAVE_TESTING noinst_PROGRAMS = $(noinst_mysql_progs) \ perf-regex \ gnunet-regex-profiler \ gnunet-daemon-regexprofiler +endif perf_regex_SOURCES = \ perf-regex.c diff --git a/src/set/Makefile.am b/src/set/Makefile.am index c2449e0ea9..68ed551904 100644 --- a/src/set/Makefile.am +++ b/src/set/Makefile.am @@ -62,8 +62,10 @@ libgnunetset_la_LIBADD = \ libgnunetset_la_LDFLAGS = \ $(GN_LIB_LDFLAGS) +if HAVE_TESTING check_PROGRAMS = \ test_set_api +endif if ENABLE_TEST_RUN TESTS = $(check_PROGRAMS) diff --git a/src/stream/Makefile.am b/src/stream/Makefile.am index c42f752bf2..d21f170bef 100644 --- a/src/stream/Makefile.am +++ b/src/stream/Makefile.am @@ -27,6 +27,7 @@ if HAVE_BENCHMARKS perf_stream_api endif +if HAVE_TESTING check_PROGRAMS = \ test_stream_2peers \ test_stream_2peers_halfclose \ @@ -35,6 +36,7 @@ check_PROGRAMS = \ test_stream_sequence_wraparound \ mesh-test \ $(STREAM_BENCHMARKS) +endif EXTRA_DIST = test_stream_local.conf @@ -95,4 +97,4 @@ perf_stream_api_LDADD = \ mesh_test_SOURCES = mesh-test.c mesh_test_LDADD = \ $(top_builddir)/src/mesh/libgnunetmesh.la \ - $(top_builddir)/src/util/libgnunetutil.la
\ No newline at end of file + $(top_builddir)/src/util/libgnunetutil.la diff --git a/src/topology/Makefile.am b/src/topology/Makefile.am index 91a5384f7e..e5215f7a91 100644 --- a/src/topology/Makefile.am +++ b/src/topology/Makefile.am @@ -27,9 +27,10 @@ gnunet_daemon_topology_LDADD = \ $(GN_LIBINTL) - +if HAVE_TESTING check_PROGRAMS = \ test_gnunet_daemon_topology +endif if ENABLE_TEST_RUN TESTS = $(check_PROGRAMS) diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 258a7aae53..4ace2bc1e7 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am @@ -81,9 +81,13 @@ noinst_PROGRAMS = \ $(WLAN_BIN_SENDER) \ $(WLAN_BIN_RECEIVER) +if HAVE_TESTING +TESTING_LIBS = libgnunettransporttesting.la +endif + lib_LTLIBRARIES = \ libgnunettransport.la \ - libgnunettransporttesting.la + $(TESTING_LIBS) libgnunettransporttesting_la_SOURCES = \ transport-testing.c transport-testing.h @@ -308,6 +312,7 @@ libgnunet_plugin_transport_https_server_la_LDFLAGS = \ libgnunet_plugin_transport_https_server_la_CFLAGS = \ $(CFLAGS) -DBUILD_HTTPS +if HAVE_TESTING check_PROGRAMS = \ test_transport_testing_startstop \ test_transport_testing_restart \ @@ -368,6 +373,7 @@ check_PROGRAMS = \ $(HTTP_QUOTA_TEST) \ $(HTTPS_QUOTA_TEST) \ $(WLAN_QUOTA_TEST) +endif if ENABLE_TEST_RUN TESTS = \ diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 7bcac3d295..44e22e390c 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -124,6 +124,10 @@ libgnunetutil_la_LDFLAGS = \ $(GN_LIB_LDFLAGS) \ -version-info 11:0:2 +if HAVE_TESTING + GNUNET_ECC = gnunet-ecc +endif + libexec_PROGRAMS = \ gnunet-service-resolver @@ -131,7 +135,7 @@ libexec_PROGRAMS = \ bin_PROGRAMS = \ gnunet-resolver \ gnunet-config \ - gnunet-ecc \ + $(GNUNET_ECC) \ gnunet-rsa \ gnunet-uri diff --git a/src/util/test_mq.c b/src/util/test_mq.c index 1ec4c37f8c..f98fcd2354 100644 --- a/src/util/test_mq.c +++ b/src/util/test_mq.c @@ -24,7 +24,6 @@ */ #include "platform.h" #include "gnunet_util_lib.h" -#include "gnunet_testing_lib.h" GNUNET_NETWORK_STRUCT_BEGIN |