fixes to build
authorChristian Grothoff <christian@grothoff.org>
Wed, 28 Jul 2010 12:00:34 +0000 (12:00 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 28 Jul 2010 12:00:34 +0000 (12:00 +0000)
24 files changed:
HACKING
configure.ac
src/arm/Makefile.am
src/core/Makefile.am
src/datacache/Makefile.am
src/datastore/Makefile.am
src/dht/Makefile.am
src/dv/Makefile.am
src/fragmentation/Makefile.am
src/fs/Makefile.am
src/hello/Makefile.am
src/hostlist/Makefile.am
src/monkey/Makefile.am
src/nat/Makefile.am
src/peerinfo-tool/Makefile.am
src/peerinfo/Makefile.am
src/statistics/Makefile.am
src/template/Makefile.am
src/testing/Makefile.am
src/topology/Makefile.am
src/transport/Makefile.am
src/upnp/Makefile.am
src/util/Makefile.am
src/vpn/Makefile.am

diff --git a/HACKING b/HACKING
index c24e6cceec87d5dc2c58eccf7fd86da0d08bc078..511a88060b25376e5422a9fb0d6c7e3a724080f1 100644 (file)
--- 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/.
+
index fb6856314a6a6e2dd2e71dd65d8bbb3d124737d5..40608c5ce98cc4f130d06b821cc896da1521c4e7 100644 (file)
@@ -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.])
index b60699e85a058c67237db5fd0a22849473f6c959..3f91e9981af92ca9ed24a5f5906b1530a2f8e165 100644 (file)
@@ -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
index d6b938764183186599714669903db111286f1b7d..83a8d1d35bf4b355ffed4c3fd1dc191a797e0aad 100644 (file)
@@ -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
index 564af9f28343efe3ba9c821b95e9c85334daeae4..0713d792d7937c7fd08a704ea1f893e6f7298162 100644 (file)
@@ -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
index 76d342bbd45065ccd27f0ea8f18ebfad993ba12d..7904907b6f0f02abbf7d2aa3e50bf8204407951b 100644 (file)
@@ -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
index 4f4280147bb0e2a50e77a65fe9cce7e09ac3fbfe..b96ce45e716055bfe2f1c3dae1c7b5e5c42bf005 100644 (file)
@@ -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
index 14dd18c1cdb131db8c90aff485afe73061e779d0..5c4a2fc55f065de3b88acec8f5af09b75a821a46 100644 (file)
@@ -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
index 47915a35fb0927b13f437edfe38620eec5ac5fe2..f00c0958c0cb61f597a42ecbe1a4d66bf609b06e 100644 (file)
@@ -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
index 9625af830c718b92823534b6fbdd45e3b6c4f730..4a7e4621a103b6d226596a6e231d355b7c4b1b25 100644 (file)
@@ -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 = \
index c831ecbbc29e9950f218f7757fd9012a95c86485..703776c6556aea24837b910871258fedd1bce8f7 100644 (file)
@@ -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
index 14b872ed3352f744b670069ac24ff1ea01faaf2a..e2dd27a2929034ab11436cfc3fc247947e666c6e 100644 (file)
@@ -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
index 6c8c6f9b3eca80419e51896c8e4cb690e5e6b951..3ac9a1744a1781b4dbfc5d43e14a6e41f6ccbc2a 100644 (file)
@@ -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
index 57be6832d5cdc5842921638d0e9ba228f5cbf030..14a4d4e922b187aa9cd431965ef3bee32b150f48 100644 (file)
@@ -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
index e6593752dc06c9f6a854944b1379e5b87369a8a2..f4f41ffad4417139b7f8c881478b706fca2dd2bf 100644 (file)
@@ -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'
 
index a95eafba1341163d147081839b194e34c8786b69..31c7ab92d8e854240b7b4524e33cac2cc5af79e2 100644 (file)
@@ -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
index 0e2e4d72776653d2a1c3b002168c3988d86ceebc..6a276dbd548bc77dde096b00ab6dba7707b6b97f 100644 (file)
@@ -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
index 47d6b41653f84c914e9b5d9e05ab6048d876ba23..f17e481662c76b663737e2ea66784c6e039c3b6b 100644 (file)
@@ -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
index 152b528d20cd1385199629f21ec35e977347e004..77d3e8cbefc11e3bab3c959b309c679fb8fb26d6 100644 (file)
@@ -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
index 7bedd09104a19152901d2e41f9152cdd6590faae..00038a23677e7fa09a31651dbdba98d990db032e 100644 (file)
@@ -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
index 2ec29bb9b4868356beaabd5ce1b2a746f13cca0c..c9f458b08501fe2025a63e6c8f0d62f95d1c6c09 100644 (file)
@@ -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
index 02a2b139d6ce4009463263f76b37acad592c6f97..83ccf5b4664fa67d01c01f38c18e1a5ce0155be3 100644 (file)
@@ -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
index 4b28cabf1e1fc4238b17dc231e310117e41e6087..491e61d8de2c5f6476a7e4d01ba86f85f173639b 100644 (file)
@@ -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
index afb6a7ba96679ba53c74488a9c23f67175e3a55d..77f04f0bdfb332eb22eaca5cfca48ef1be0030e5 100644 (file)
@@ -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