summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-07-28 12:00:34 +0000
committerChristian Grothoff <christian@grothoff.org>2010-07-28 12:00:34 +0000
commite3dca1bf40ac8d8a884c261045ad1e9cade49a15 (patch)
tree9db4cf6a2dcf5716d2d1548cab0d0d9922443c6a
parent8f4f36517e4220ca5539008cd19cb3b9a40f6499 (diff)
fixes to build
-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:
instead of
int i,j;
+
+
+
+Build-system:
+
+If you have code that is likely not to compile or build rules you might want to not
+trigger for most developers, use "if HAVE_EXPERIMENTAL" in your Makefile.am. Then
+it is OK to (temporarily) add non-compiling (or known-to-not-port) code.
+
+If you want to compile all testcases but NOT run them, run configure with the
+--enable-test-suppression option.
+
+If you want to obtain code coverage results, run configure with the
+--enable-coverage option and run the coverage.sh script in contrib/.
+
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)
AC_SUBST(EXT_LIB_PATH)
+# should 'make check' run tests?
+AC_MSG_CHECKING(whether to disable running tests)
+AC_ARG_ENABLE(testruns,
+ [AS_HELP_STRING([--enable-test-suppression],
+ [disable running tests on make check])],
+ [disable_tests_run=$enableval],
+ [disable_tests_run="no"])
+AC_MSG_RESULT($disable_test_run)
+AM_CONDITIONAL([DISABLE_TEST_RUN], [test "x$disable_tests_run" = "xyes"])
+
+# should experimental code be compiled (code that may not yet compile)?
+disable_experimental=yes
+AC_MSG_CHECKING(whether to compile experimental code)
+AC_ARG_ENABLE(experimental,
+ [AS_HELP_STRING([--enable-experimental],
+ [enable compiling experimental code])],
+ [enable_experimental=$enableval],
+ [enable_experimental="no"])
+AC_MSG_RESULT($enable_experimental)
+AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
+
# gcov compilation
use_gcov=no
AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage],
@@ -772,6 +793,11 @@ then
AC_MSG_NOTICE([NOTICE: libesmtp not found, monkey will not be installed.])
fi
+if test "x$pcap" != "x1"
+then
+ AC_MSG_NOTICE([NOTICE: libpcap not found, WiFi support will not be installed.])
+fi
+
if test "x$openssl" != "x1"
then
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 = \
check_SCRIPTS = \
test_gnunet_arm.sh
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
+endif
test_arm_api_SOURCES = \
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 = \
test_core_api \
test_core_api_reliability
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
+endif
test_core_api_SOURCES = \
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 = \
test_datacache_quota \
perf_datacache
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
+endif
test_datacache_SOURCES = \
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 = \
perf_datastore_api \
perf_plugin_datastore
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
+endif
test_datastore_api_SOURCES = \
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
endif
plugindir = $(libdir)/gnunet
-HAVE_MYSQL = 0
+HAVE_MYSQL=0
if HAVE_MYSQL
MYSQL_PLUGIN = libgnunet_plugin_dhtlog_mysql.la
endif
@@ -61,7 +61,7 @@ libgnunetdht_la_LDFLAGS = \
$(GN_LIB_LDFLAGS) $(WINFLAGS) \
-version-info 0:0:0
-if HAVE_MYSQL
+if HAVE_EXPERIMENTAL
STUD_PROGS = gnunet-service-dht-can \
gnunet-service-dht-freenet \
gnunet-service-dht-kademlia \
@@ -179,9 +179,11 @@ check_PROGRAMS = \
test_dht_multipeer \
test_dhtlog
+if !DISABLE_TEST_RUN
TESTS = test_dht_api $(check_SCRIPTS) \
test_dht_twopeer \
test_dht_twopeer_put_get
+endif
test_dht_api_SOURCES = \
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 = \
$(top_builddir)/src/util/libgnunetutil.la
libgnunet_plugin_transport_dv_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
-
-
+
+
check_PROGRAMS = \
test_transport_api_dv
# test_dv_topology
-
+
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
+endif
test_transport_api_dv_SOURCES = \
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 = \
check_PROGRAMS = \
test_fragmentation
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
+endif
test_fragmentation_SOURCES = \
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 = \
test_gnunet_fs_idx.py
endif
+if !DISABLE_TEST_RUN
TESTS = \
test_fs_directory \
test_fs_download \
@@ -163,6 +164,7 @@ TESTS = \
test_gnunet_service_fs_migration \
test_gnunet_service_fs_p2p \
$(check_SCRIPTS)
+endif
test_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 = \
check_PROGRAMS = \
test_hello
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
+endif
test_hello_SOURCES = \
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 = \
test_gnunet_daemon_hostlist_learning
if HAVE_MHD
+if !DISABLE_TEST_RUN
TESTS = \
test_gnunet_daemon_hostlist \
test_gnunet_daemon_hostlist_learning
endif
+endif
test_gnunet_daemon_hostlist_SOURCES = \
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 = \
$(top_builddir)/src/util/libgnunetutil.la \
$(GN_LIBINTL)
-
+if !DISABLE_TEST_RUN
#TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
+endif
check_SCRIPTS = \
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 = \
check_PROGRAMS = \
test-nat
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
+endif
test_nat_SOURCES = \
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 = \
test_gnunet_peerinfo.py
endif
+if !DISABLE_TEST_RUN
TESTS = $(check_SCRIPTS)
+endif
do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
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 = \
check_PROGRAMS = \
test_peerinfo_api
-TESTS = $(check_PROGRAMS) # $(check_SCRIPTS)
+if !DISABLE_TEST_RUN
+TESTS = $(check_PROGRAMS)
+endif
test_peerinfo_api_SOURCES = \
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 = \
test_statistics_api \
test_statistics_api_loop
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
+endif
test_statistics_api_SOURCES = \
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 = \
check_PROGRAMS = \
test_template_api
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
+endif
test_template_api_SOURCES = \
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 = \
test_testing_topology_internat \
test_testing_topology_none \
test_testing_topology_scale_free
-
+
+if !DISABLE_TEST_RUN
TESTS = \
test_testing \
test_testing_connect \
@@ -60,6 +61,7 @@ TESTS = \
# test_testing_topology_erdos_renyi \
# test_testing_topology_internat \
# test_testing_topology_scale_free
+endif
test_testing_SOURCES = \
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 = \
check_PROGRAMS = \
test_gnunet_daemon_topology
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
+endif
test_gnunet_daemon_topology_SOURCES = \
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 = \
$(HTTPS_REL_TEST)
# TODO: add tests for nat, etc.
+if !DISABLE_TEST_RUN
TESTS = \
test_transport_api_tcp \
test_transport_api_tcp_nat \
@@ -189,6 +190,7 @@ TESTS = \
test_transport_api_reliability_tcp_nat \
$(HTTP_REL_TEST) \
$(HTTPS_REL_TEST)
+endif
test_transport_api_tcp_SOURCES = \
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 = \
$(GN_LIBINTL)
-check_PROGRAMS = \
+check_PROGRAMS = \
test_upnp
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
+endif
test_upnp_SOURCES = \
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 = \
perf_crypto_hash \
test_os_start_process
-
+if !DISABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
-
+endif
test_bio_SOURCES = \
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 = \
#check_PROGRAMS = \
# test_XXX
+if !DISABLE_TEST_RUN
#TESTS = \
# test_transport_api_tcp
-
+endif
#test_transport_api_tcp_SOURCES = \
# test_transport_api.c