aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HACKING15
-rw-r--r--configure.ac26
-rw-r--r--src/arm/Makefile.am2
-rw-r--r--src/core/Makefile.am2
-rw-r--r--src/datacache/Makefile.am2
-rw-r--r--src/datastore/Makefile.am2
-rw-r--r--src/dht/Makefile.am6
-rw-r--r--src/dv/Makefile.am8
-rw-r--r--src/fragmentation/Makefile.am2
-rw-r--r--src/fs/Makefile.am2
-rw-r--r--src/hello/Makefile.am2
-rw-r--r--src/hostlist/Makefile.am2
-rw-r--r--src/monkey/Makefile.am3
-rw-r--r--src/nat/Makefile.am2
-rw-r--r--src/peerinfo-tool/Makefile.am2
-rw-r--r--src/peerinfo/Makefile.am4
-rw-r--r--src/statistics/Makefile.am2
-rw-r--r--src/template/Makefile.am2
-rw-r--r--src/testing/Makefile.am4
-rw-r--r--src/topology/Makefile.am2
-rw-r--r--src/transport/Makefile.am2
-rw-r--r--src/upnp/Makefile.am4
-rw-r--r--src/util/Makefile.am4
-rw-r--r--src/vpn/Makefile.am3
24 files changed, 93 insertions, 12 deletions
diff --git a/HACKING b/HACKING
index c24e6ccee..511a88060 100644
--- a/HACKING
+++ b/HACKING
@@ -80,3 +80,18 @@ Coding style:
80 instead of 80 instead of
81 81
82 int i,j; 82 int i,j;
83
84
85
86Build-system:
87
88If you have code that is likely not to compile or build rules you might want to not
89trigger for most developers, use "if HAVE_EXPERIMENTAL" in your Makefile.am. Then
90it is OK to (temporarily) add non-compiling (or known-to-not-port) code.
91
92If you want to compile all testcases but NOT run them, run configure with the
93--enable-test-suppression option.
94
95If you want to obtain code coverage results, run configure with the
96--enable-coverage option and run the coverage.sh script in contrib/.
97
diff --git a/configure.ac b/configure.ac
index fb6856314..40608c5ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -706,6 +706,27 @@ AC_SUBST(DLLDIR)
706AC_SUBST(EXT_LIB_PATH) 706AC_SUBST(EXT_LIB_PATH)
707 707
708 708
709# should 'make check' run tests?
710AC_MSG_CHECKING(whether to disable running tests)
711AC_ARG_ENABLE(testruns,
712 [AS_HELP_STRING([--enable-test-suppression],
713 [disable running tests on make check])],
714 [disable_tests_run=$enableval],
715 [disable_tests_run="no"])
716AC_MSG_RESULT($disable_test_run)
717AM_CONDITIONAL([DISABLE_TEST_RUN], [test "x$disable_tests_run" = "xyes"])
718
719# should experimental code be compiled (code that may not yet compile)?
720disable_experimental=yes
721AC_MSG_CHECKING(whether to compile experimental code)
722AC_ARG_ENABLE(experimental,
723 [AS_HELP_STRING([--enable-experimental],
724 [enable compiling experimental code])],
725 [enable_experimental=$enableval],
726 [enable_experimental="no"])
727AC_MSG_RESULT($enable_experimental)
728AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
729
709# gcov compilation 730# gcov compilation
710use_gcov=no 731use_gcov=no
711AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage], 732AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage],
@@ -772,6 +793,11 @@ then
772 AC_MSG_NOTICE([NOTICE: libesmtp not found, monkey will not be installed.]) 793 AC_MSG_NOTICE([NOTICE: libesmtp not found, monkey will not be installed.])
773fi 794fi
774 795
796if test "x$pcap" != "x1"
797then
798 AC_MSG_NOTICE([NOTICE: libpcap not found, WiFi support will not be installed.])
799fi
800
775if test "x$openssl" != "x1" 801if test "x$openssl" != "x1"
776then 802then
777 AC_MSG_NOTICE([NOTICE: OpenSSL not found, monkey will not be installed.]) 803 AC_MSG_NOTICE([NOTICE: OpenSSL not found, monkey will not be installed.])
diff --git a/src/arm/Makefile.am b/src/arm/Makefile.am
index b60699e85..3f91e9981 100644
--- a/src/arm/Makefile.am
+++ b/src/arm/Makefile.am
@@ -55,7 +55,9 @@ check_PROGRAMS = \
55check_SCRIPTS = \ 55check_SCRIPTS = \
56 test_gnunet_arm.sh 56 test_gnunet_arm.sh
57 57
58if !DISABLE_TEST_RUN
58TESTS = $(check_PROGRAMS) $(check_SCRIPTS) 59TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
60endif
59 61
60test_arm_api_SOURCES = \ 62test_arm_api_SOURCES = \
61 test_arm_api.c 63 test_arm_api.c
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index d6b938764..83a8d1d35 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -44,7 +44,9 @@ check_PROGRAMS = \
44 test_core_api \ 44 test_core_api \
45 test_core_api_reliability 45 test_core_api_reliability
46 46
47if !DISABLE_TEST_RUN
47TESTS = $(check_PROGRAMS) 48TESTS = $(check_PROGRAMS)
49endif
48 50
49test_core_api_SOURCES = \ 51test_core_api_SOURCES = \
50 test_core_api.c 52 test_core_api.c
diff --git a/src/datacache/Makefile.am b/src/datacache/Makefile.am
index 564af9f28..0713d792d 100644
--- a/src/datacache/Makefile.am
+++ b/src/datacache/Makefile.am
@@ -52,7 +52,9 @@ check_PROGRAMS = \
52 test_datacache_quota \ 52 test_datacache_quota \
53 perf_datacache 53 perf_datacache
54 54
55if !DISABLE_TEST_RUN
55TESTS = $(check_PROGRAMS) 56TESTS = $(check_PROGRAMS)
57endif
56 58
57test_datacache_SOURCES = \ 59test_datacache_SOURCES = \
58 test_datacache.c 60 test_datacache.c
diff --git a/src/datastore/Makefile.am b/src/datastore/Makefile.am
index 76d342bbd..7904907b6 100644
--- a/src/datastore/Makefile.am
+++ b/src/datastore/Makefile.am
@@ -63,7 +63,9 @@ check_PROGRAMS = \
63 perf_datastore_api \ 63 perf_datastore_api \
64 perf_plugin_datastore 64 perf_plugin_datastore
65 65
66if !DISABLE_TEST_RUN
66TESTS = $(check_PROGRAMS) 67TESTS = $(check_PROGRAMS)
68endif
67 69
68test_datastore_api_SOURCES = \ 70test_datastore_api_SOURCES = \
69 test_datastore_api.c 71 test_datastore_api.c
diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am
index 4f4280147..b96ce45e7 100644
--- a/src/dht/Makefile.am
+++ b/src/dht/Makefile.am
@@ -4,7 +4,7 @@ if MINGW
4endif 4endif
5 5
6plugindir = $(libdir)/gnunet 6plugindir = $(libdir)/gnunet
7HAVE_MYSQL = 0 7HAVE_MYSQL=0
8if HAVE_MYSQL 8if HAVE_MYSQL
9 MYSQL_PLUGIN = libgnunet_plugin_dhtlog_mysql.la 9 MYSQL_PLUGIN = libgnunet_plugin_dhtlog_mysql.la
10endif 10endif
@@ -61,7 +61,7 @@ libgnunetdht_la_LDFLAGS = \
61 $(GN_LIB_LDFLAGS) $(WINFLAGS) \ 61 $(GN_LIB_LDFLAGS) $(WINFLAGS) \
62 -version-info 0:0:0 62 -version-info 0:0:0
63 63
64if HAVE_MYSQL 64if HAVE_EXPERIMENTAL
65STUD_PROGS = gnunet-service-dht-can \ 65STUD_PROGS = gnunet-service-dht-can \
66 gnunet-service-dht-freenet \ 66 gnunet-service-dht-freenet \
67 gnunet-service-dht-kademlia \ 67 gnunet-service-dht-kademlia \
@@ -179,9 +179,11 @@ check_PROGRAMS = \
179 test_dht_multipeer \ 179 test_dht_multipeer \
180 test_dhtlog 180 test_dhtlog
181 181
182if !DISABLE_TEST_RUN
182TESTS = test_dht_api $(check_SCRIPTS) \ 183TESTS = test_dht_api $(check_SCRIPTS) \
183 test_dht_twopeer \ 184 test_dht_twopeer \
184 test_dht_twopeer_put_get 185 test_dht_twopeer_put_get
186endif
185 187
186test_dht_api_SOURCES = \ 188test_dht_api_SOURCES = \
187 test_dht_api.c 189 test_dht_api.c
diff --git a/src/dv/Makefile.am b/src/dv/Makefile.am
index 14dd18c1c..5c4a2fc55 100644
--- a/src/dv/Makefile.am
+++ b/src/dv/Makefile.am
@@ -47,13 +47,15 @@ libgnunet_plugin_transport_dv_la_LIBADD = \
47 $(top_builddir)/src/util/libgnunetutil.la 47 $(top_builddir)/src/util/libgnunetutil.la
48libgnunet_plugin_transport_dv_la_LDFLAGS = \ 48libgnunet_plugin_transport_dv_la_LDFLAGS = \
49 $(GN_PLUGIN_LDFLAGS) 49 $(GN_PLUGIN_LDFLAGS)
50 50
51 51
52check_PROGRAMS = \ 52check_PROGRAMS = \
53 test_transport_api_dv 53 test_transport_api_dv
54# test_dv_topology 54# test_dv_topology
55 55
56if !DISABLE_TEST_RUN
56TESTS = $(check_PROGRAMS) $(check_SCRIPTS) 57TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
58endif
57 59
58test_transport_api_dv_SOURCES = \ 60test_transport_api_dv_SOURCES = \
59 test_transport_api_dv.c 61 test_transport_api_dv.c
diff --git a/src/fragmentation/Makefile.am b/src/fragmentation/Makefile.am
index 47915a35f..f00c0958c 100644
--- a/src/fragmentation/Makefile.am
+++ b/src/fragmentation/Makefile.am
@@ -18,7 +18,9 @@ libgnunetfragmentation_la_LIBADD = \
18check_PROGRAMS = \ 18check_PROGRAMS = \
19 test_fragmentation 19 test_fragmentation
20 20
21if !DISABLE_TEST_RUN
21TESTS = $(check_PROGRAMS) 22TESTS = $(check_PROGRAMS)
23endif
22 24
23test_fragmentation_SOURCES = \ 25test_fragmentation_SOURCES = \
24 test_frag_ji.c 26 test_frag_ji.c
diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am
index 9625af830..4a7e4621a 100644
--- a/src/fs/Makefile.am
+++ b/src/fs/Makefile.am
@@ -143,6 +143,7 @@ check_SCRIPTS = \
143 test_gnunet_fs_idx.py 143 test_gnunet_fs_idx.py
144endif 144endif
145 145
146if !DISABLE_TEST_RUN
146TESTS = \ 147TESTS = \
147 test_fs_directory \ 148 test_fs_directory \
148 test_fs_download \ 149 test_fs_download \
@@ -163,6 +164,7 @@ TESTS = \
163 test_gnunet_service_fs_migration \ 164 test_gnunet_service_fs_migration \
164 test_gnunet_service_fs_p2p \ 165 test_gnunet_service_fs_p2p \
165 $(check_SCRIPTS) 166 $(check_SCRIPTS)
167endif
166 168
167 169
168test_fs_directory_SOURCES = \ 170test_fs_directory_SOURCES = \
diff --git a/src/hello/Makefile.am b/src/hello/Makefile.am
index c831ecbbc..703776c65 100644
--- a/src/hello/Makefile.am
+++ b/src/hello/Makefile.am
@@ -19,7 +19,9 @@ libgnunethello_la_LIBADD = \
19check_PROGRAMS = \ 19check_PROGRAMS = \
20 test_hello 20 test_hello
21 21
22if !DISABLE_TEST_RUN
22TESTS = $(check_PROGRAMS) 23TESTS = $(check_PROGRAMS)
24endif
23 25
24test_hello_SOURCES = \ 26test_hello_SOURCES = \
25 test_hello.c 27 test_hello.c
diff --git a/src/hostlist/Makefile.am b/src/hostlist/Makefile.am
index 14b872ed3..e2dd27a29 100644
--- a/src/hostlist/Makefile.am
+++ b/src/hostlist/Makefile.am
@@ -36,10 +36,12 @@ check_PROGRAMS = \
36 test_gnunet_daemon_hostlist_learning 36 test_gnunet_daemon_hostlist_learning
37 37
38if HAVE_MHD 38if HAVE_MHD
39if !DISABLE_TEST_RUN
39TESTS = \ 40TESTS = \
40 test_gnunet_daemon_hostlist \ 41 test_gnunet_daemon_hostlist \
41 test_gnunet_daemon_hostlist_learning 42 test_gnunet_daemon_hostlist_learning
42endif 43endif
44endif
43 45
44test_gnunet_daemon_hostlist_SOURCES = \ 46test_gnunet_daemon_hostlist_SOURCES = \
45 test_gnunet_daemon_hostlist.c 47 test_gnunet_daemon_hostlist.c
diff --git a/src/monkey/Makefile.am b/src/monkey/Makefile.am
index 6c8c6f9b3..3ac9a1744 100644
--- a/src/monkey/Makefile.am
+++ b/src/monkey/Makefile.am
@@ -66,8 +66,9 @@ bug_null_pointer_exception_LDADD = \
66 $(top_builddir)/src/util/libgnunetutil.la \ 66 $(top_builddir)/src/util/libgnunetutil.la \
67 $(GN_LIBINTL) 67 $(GN_LIBINTL)
68 68
69 69if !DISABLE_TEST_RUN
70#TESTS = $(check_PROGRAMS) $(check_SCRIPTS) 70#TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
71endif
71 72
72check_SCRIPTS = \ 73check_SCRIPTS = \
73 test_gnunet_monkey.sh 74 test_gnunet_monkey.sh
diff --git a/src/nat/Makefile.am b/src/nat/Makefile.am
index 57be6832d..14a4d4e92 100644
--- a/src/nat/Makefile.am
+++ b/src/nat/Makefile.am
@@ -35,7 +35,9 @@ libgnunetnat_la_LDFLAGS = \
35check_PROGRAMS = \ 35check_PROGRAMS = \
36 test-nat 36 test-nat
37 37
38if !DISABLE_TEST_RUN
38TESTS = $(check_PROGRAMS) 39TESTS = $(check_PROGRAMS)
40endif
39 41
40test_nat_SOURCES = \ 42test_nat_SOURCES = \
41 test_nat.c 43 test_nat.c
diff --git a/src/peerinfo-tool/Makefile.am b/src/peerinfo-tool/Makefile.am
index e6593752d..f4f41ffad 100644
--- a/src/peerinfo-tool/Makefile.am
+++ b/src/peerinfo-tool/Makefile.am
@@ -24,7 +24,9 @@ check_SCRIPTS = \
24 test_gnunet_peerinfo.py 24 test_gnunet_peerinfo.py
25endif 25endif
26 26
27if !DISABLE_TEST_RUN
27TESTS = $(check_SCRIPTS) 28TESTS = $(check_SCRIPTS)
29endif
28 30
29do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' 31do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
30 32
diff --git a/src/peerinfo/Makefile.am b/src/peerinfo/Makefile.am
index a95eafba1..31c7ab92d 100644
--- a/src/peerinfo/Makefile.am
+++ b/src/peerinfo/Makefile.am
@@ -37,7 +37,9 @@ gnunet_service_peerinfo_LDADD = \
37check_PROGRAMS = \ 37check_PROGRAMS = \
38 test_peerinfo_api 38 test_peerinfo_api
39 39
40TESTS = $(check_PROGRAMS) # $(check_SCRIPTS) 40if !DISABLE_TEST_RUN
41TESTS = $(check_PROGRAMS)
42endif
41 43
42test_peerinfo_api_SOURCES = \ 44test_peerinfo_api_SOURCES = \
43 test_peerinfo_api.c 45 test_peerinfo_api.c
diff --git a/src/statistics/Makefile.am b/src/statistics/Makefile.am
index 0e2e4d727..6a276dbd5 100644
--- a/src/statistics/Makefile.am
+++ b/src/statistics/Makefile.am
@@ -45,7 +45,9 @@ check_PROGRAMS = \
45 test_statistics_api \ 45 test_statistics_api \
46 test_statistics_api_loop 46 test_statistics_api_loop
47 47
48if !DISABLE_TEST_RUN
48TESTS = $(check_PROGRAMS) $(check_SCRIPTS) 49TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
50endif
49 51
50test_statistics_api_SOURCES = \ 52test_statistics_api_SOURCES = \
51 test_statistics_api.c 53 test_statistics_api.c
diff --git a/src/template/Makefile.am b/src/template/Makefile.am
index 47d6b4165..f17e48166 100644
--- a/src/template/Makefile.am
+++ b/src/template/Makefile.am
@@ -28,7 +28,9 @@ gnunet_service_template_LDADD = \
28check_PROGRAMS = \ 28check_PROGRAMS = \
29 test_template_api 29 test_template_api
30 30
31if !DISABLE_TEST_RUN
31TESTS = $(check_PROGRAMS) 32TESTS = $(check_PROGRAMS)
33endif
32 34
33test_template_api_SOURCES = \ 35test_template_api_SOURCES = \
34 test_template_api.c 36 test_template_api.c
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am
index 152b528d2..77d3e8cbe 100644
--- a/src/testing/Makefile.am
+++ b/src/testing/Makefile.am
@@ -40,7 +40,8 @@ check_PROGRAMS = \
40 test_testing_topology_internat \ 40 test_testing_topology_internat \
41 test_testing_topology_none \ 41 test_testing_topology_none \
42 test_testing_topology_scale_free 42 test_testing_topology_scale_free
43 43
44if !DISABLE_TEST_RUN
44TESTS = \ 45TESTS = \
45 test_testing \ 46 test_testing \
46 test_testing_connect \ 47 test_testing_connect \
@@ -60,6 +61,7 @@ TESTS = \
60# test_testing_topology_erdos_renyi \ 61# test_testing_topology_erdos_renyi \
61# test_testing_topology_internat \ 62# test_testing_topology_internat \
62# test_testing_topology_scale_free 63# test_testing_topology_scale_free
64endif
63 65
64test_testing_SOURCES = \ 66test_testing_SOURCES = \
65 test_testing.c 67 test_testing.c
diff --git a/src/topology/Makefile.am b/src/topology/Makefile.am
index 7bedd0910..00038a236 100644
--- a/src/topology/Makefile.am
+++ b/src/topology/Makefile.am
@@ -23,7 +23,9 @@ gnunet_daemon_topology_LDADD = \
23check_PROGRAMS = \ 23check_PROGRAMS = \
24 test_gnunet_daemon_topology 24 test_gnunet_daemon_topology
25 25
26if !DISABLE_TEST_RUN
26TESTS = $(check_PROGRAMS) 27TESTS = $(check_PROGRAMS)
28endif
27 29
28test_gnunet_daemon_topology_SOURCES = \ 30test_gnunet_daemon_topology_SOURCES = \
29 test_gnunet_daemon_topology.c 31 test_gnunet_daemon_topology.c
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index 2ec29bb9b..c9f458b08 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -176,6 +176,7 @@ check_PROGRAMS = \
176 $(HTTPS_REL_TEST) 176 $(HTTPS_REL_TEST)
177# TODO: add tests for nat, etc. 177# TODO: add tests for nat, etc.
178 178
179if !DISABLE_TEST_RUN
179TESTS = \ 180TESTS = \
180 test_transport_api_tcp \ 181 test_transport_api_tcp \
181 test_transport_api_tcp_nat \ 182 test_transport_api_tcp_nat \
@@ -189,6 +190,7 @@ TESTS = \
189 test_transport_api_reliability_tcp_nat \ 190 test_transport_api_reliability_tcp_nat \
190 $(HTTP_REL_TEST) \ 191 $(HTTP_REL_TEST) \
191 $(HTTPS_REL_TEST) 192 $(HTTPS_REL_TEST)
193endif
192 194
193test_transport_api_tcp_SOURCES = \ 195test_transport_api_tcp_SOURCES = \
194 test_transport_api.c 196 test_transport_api.c
diff --git a/src/upnp/Makefile.am b/src/upnp/Makefile.am
index 02a2b139d..83ccf5b46 100644
--- a/src/upnp/Makefile.am
+++ b/src/upnp/Makefile.am
@@ -44,10 +44,12 @@ gnunet_service_upnp_LDADD = \
44 $(GN_LIBINTL) 44 $(GN_LIBINTL)
45 45
46 46
47check_PROGRAMS = \ 47check_PROGRAMS = \
48 test_upnp 48 test_upnp
49 49
50if !DISABLE_TEST_RUN
50TESTS = $(check_PROGRAMS) 51TESTS = $(check_PROGRAMS)
52endif
51 53
52test_upnp_SOURCES = \ 54test_upnp_SOURCES = \
53 test_upnp.c 55 test_upnp.c
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 4b28cabf1..491e61d8d 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -144,9 +144,9 @@ check_PROGRAMS = \
144 perf_crypto_hash \ 144 perf_crypto_hash \
145 test_os_start_process 145 test_os_start_process
146 146
147 147if !DISABLE_TEST_RUN
148TESTS = $(check_PROGRAMS) 148TESTS = $(check_PROGRAMS)
149 149endif
150 150
151test_bio_SOURCES = \ 151test_bio_SOURCES = \
152 test_bio.c 152 test_bio.c
diff --git a/src/vpn/Makefile.am b/src/vpn/Makefile.am
index afb6a7ba9..77f04f0bd 100644
--- a/src/vpn/Makefile.am
+++ b/src/vpn/Makefile.am
@@ -47,9 +47,10 @@ gnunet_daemon_vpn_LDADD = \
47#check_PROGRAMS = \ 47#check_PROGRAMS = \
48# test_XXX 48# test_XXX
49 49
50if !DISABLE_TEST_RUN
50#TESTS = \ 51#TESTS = \
51# test_transport_api_tcp 52# test_transport_api_tcp
52 53endif
53 54
54#test_transport_api_tcp_SOURCES = \ 55#test_transport_api_tcp_SOURCES = \
55# test_transport_api.c 56# test_transport_api.c