summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-06-10 10:45:33 +0000
committerChristian Grothoff <christian@grothoff.org>2011-06-10 10:45:33 +0000
commitf7b5b476ba55ee45fefff22777f525cc81b4cae8 (patch)
treea33e5983ab6c8b0e35c1055cb7503ec4fac90041
parent0ac9a4984e1e551293ea8ea00f3c8ea2c5460d91 (diff)
adding configure code for --enable-benchmarks, --enable-expensive-tests, some clean up
-rw-r--r--HACKING40
-rw-r--r--TODO1
-rw-r--r--configure.ac90
-rw-r--r--m4/libcurl.m4109
-rw-r--r--src/arm/Makefile.am2
-rw-r--r--src/chat/Makefile.am2
-rw-r--r--src/core/Makefile.am2
-rw-r--r--src/datacache/Makefile.am20
-rw-r--r--src/datastore/Makefile.am26
-rw-r--r--src/dht/Makefile.am2
-rw-r--r--src/dv/Makefile.am2
-rw-r--r--src/fragmentation/Makefile.am2
-rw-r--r--src/fs/Makefile.am16
-rw-r--r--src/hello/Makefile.am2
-rw-r--r--src/hostlist/Makefile.am2
-rw-r--r--src/monkey/Makefile.am2
-rw-r--r--src/peerinfo-tool/Makefile.am2
-rw-r--r--src/peerinfo/Makefile.am8
-rw-r--r--src/statistics/Makefile.am2
-rw-r--r--src/template/Makefile.am2
-rw-r--r--src/testing/Makefile.am2
-rw-r--r--src/topology/Makefile.am2
-rw-r--r--src/transport/Makefile.am8
-rw-r--r--src/util/Makefile.am9
-rw-r--r--src/vpn/Makefile.am2
25 files changed, 217 insertions, 140 deletions
diff --git a/HACKING b/HACKING
index 511a88060..535d4498f 100644
--- a/HACKING
+++ b/HACKING
@@ -13,6 +13,7 @@ include files:
* gnunet_directories.h --- generated
* gettext.h --- external library
+
configuration:
- paths (that are substituted in all filenames) are in PATHS (have as few as possible)
- globals for the daemon are in [gnunetd] (for now, have as few as possible!)
@@ -22,11 +23,11 @@ configuration:
together with the options for the testing module itself
-
exported symbols:
- must start with "GNUNET_modulename_" and be defined in "modulename.c"
- exceptions: those defined in gnunet_common.h
+
private (library-internal) symbols (including structs & macros):
- must NOT start with any prefix
- must not be exported in a way that linkers could use them or
@@ -43,7 +44,7 @@ testcases:
performance tests:
- must be called "perf_module-under-test_case-description.c"
- "case-description" maybe omitted if there is only one performance test
-
+- Must only be run if HAVE_BENCHMARKS is satisfied
src/ directories:
@@ -54,22 +55,6 @@ src/ directories:
- libgnunet_plugin_DIR_NAME: loadable plugins (i.e., libgnunet_plugin_transport_tcp)
-
-Minimum file-sharing system (in order of dependency):
-gnunet-service-arm
-gnunet-service-transport
-gnunet-service-core
-gnunet-daemon-hostlist
-gnunet-daemon-topology
-gnunet-service-statistics
-gnunet-service-datastore
-gnunet-service-datacache
-gnunet-service-dht
-gnunet-service-fs (or just lib?)
-
-
-
-
Coding style:
- GNU guidelines apply
- declare only one variable per line, so
@@ -82,7 +67,6 @@ Coding style:
int i,j;
-
Build-system:
If you have code that is likely not to compile or build rules you might want to not
@@ -92,6 +76,24 @@ 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 run all testcases, including those that take a while, run configure with the
+--enable-expensive-testcases option.
+
+If you want to compile and run benchmarks, run configure with the
+--enable-benchmarks option.
+
If you want to obtain code coverage results, run configure with the
--enable-coverage option and run the coverage.sh script in contrib/.
+
+Minimum file-sharing system (in order of dependency):
+gnunet-service-arm
+gnunet-service-transport
+gnunet-service-core
+gnunet-daemon-hostlist
+gnunet-daemon-topology
+gnunet-service-statistics
+gnunet-service-datastore
+gnunet-service-datacache
+gnunet-service-dht
+gnunet-service-fs
diff --git a/TODO b/TODO
index b591310cb..9bfde8893 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,5 @@
0.9.0pre3:
* clean buildbots
-* clean build
0.9.0:
* new webpage:
diff --git a/configure.ac b/configure.ac
index 815c040b0..b720be535 100644
--- a/configure.ac
+++ b/configure.ac
@@ -714,61 +714,87 @@ AC_SUBST(EXT_LIB_PATH)
# should 'make check' run tests?
AC_MSG_CHECKING(whether to run tests)
-AC_ARG_ENABLE(testruns,
- [AS_HELP_STRING([--enable-testruns=yes/no],
- [disable running tests on make check (default is YES)])],
- [enable_tests_run=$enableval],
- [enable_tests_run="yes"])
+AC_ARG_ENABLE([testruns],
+ [AS_HELP_STRING([--disable-testruns], [disable running tests on make check (default is YES)])],
+ [enable_tests_run=${enableval}],
+ [enable_tests_run=yes])
AC_MSG_RESULT($enable_test_run)
-AM_CONDITIONAL([DISABLE_TEST_RUN], [test "x$enable_tests_run" = "xno"])
+AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"])
+
+# should expensive tests be run?
+AC_MSG_CHECKING(whether to run expensive tests)
+AC_ARG_ENABLE([expensivetests],
+ [AS_HELP_STRING([--enable-expensive-tests], [enable running expensive testcases])],
+ [enable_expensive=${enableval}],
+ [enable_expensive=no])
+AC_MSG_RESULT($enable_expensive)
+AM_CONDITIONAL([HAVE_EXPENSIVE_TESTS], [test "x$enable_expensive" = "xyes"])
+
+# should benchmarks be run?
+AC_MSG_CHECKING(whether to run benchmarks during make check)
+AC_ARG_ENABLE([benchmarks],
+ [AS_HELP_STRING([--enable-benchmarks], [enable running benchmarks during make check])],
+ [enable_benchmarks=${enableval}],
+ [enable_benchmarks=no])
+AC_MSG_RESULT($enable_benchmarks)
+AM_CONDITIONAL([HAVE_BENCHMARKS], [test "x$enable_benchmarks" = "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_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"])
# should malicious code be compiled (code used for testing with malicious peers)
-enable_malicious=0
AC_MSG_CHECKING(whether to compile malicious code)
-AC_ARG_ENABLE(malicious,
- [AS_HELP_STRING([--enable-malicious],
- [enable compiling malicious code (only for developers for testing)])],
- [enable_malicious=1],
- [enable_malicious=0])
+AC_ARG_ENABLE([malicious],
+ [AS_HELP_STRING([--enable-malicious], [enable compiling malicious code (only for developers for testing)])],
+ [enable_malicious=${enableval}],
+ [enable_malicious=no])
AC_MSG_RESULT($enable_malicious)
-AM_CONDITIONAL([HAVE_MALICIOUS], [test "x$enable_malicious" = "x1"])
-AC_DEFINE_UNQUOTED([HAVE_MALICIOUS], $enable_malicious, [Compile malicious code])
+AM_CONDITIONAL([HAVE_MALICIOUS], [test "x$enable_malicious" = "xyes"])
+if test "$enable_malicious" = "yes"
+then
+ AC_DEFINE([HAVE_MALICIOUS],[1],[include malicious code])
+else
+ AC_DEFINE([HAVE_MALICIOUS],[0],[disable malicious code])
+fi
# should code be enabled that works around missing OS functionality on Windows?
# used for test cases
-AC_ARG_ENABLE(windows_workarounds, [AS_HELP_STRING([--enable-windows_workarounds],
- [enable workarounds used on Windows (only useful for test cases)])])
if test $build_target = "mingw"
then
workarounds=1
else
- if test x$enable_windows_workarounds = "xyes"
- then
- workarounds=1
- else
- workarounds=0
- fi
+ AC_MSG_CHECKING(whether to enable windows workarounds)
+ AC_ARG_ENABLE([windows_workarounds],
+ [AS_HELP_STRING([--enable-windows_workarounds], [enable workarounds used on Windows (only useful for test cases)])],
+ [enable_workarounds=${enableval}],
+ [enable_workarounds=no])
+ AC_MSG_RESULT($enable_workarounds)
+ if test x$enable_windows_workarounds = "xyes"
+ then
+ workarounds=1
+ else
+ workarounds=0
+ fi
fi
AC_DEFINE_UNQUOTED([ENABLE_WINDOWS_WORKAROUNDS], $workarounds, [enable workarounds used on Windows (only useful for test cases)])
# gcov compilation
-use_gcov=no
-AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage],
- [Compile the library with code coverage support (default is NO)]),
- [use_gcov=yes], [use_gcov=no])
+AC_MSG_CHECKING(whether to compile with support for code coverage analysis)
+AC_ARG_ENABLE([coverage],
+ AS_HELP_STRING([--enable-coverage],
+ [compile the library with code coverage support]),
+ [use_gcov=${enableval}],
+ [use_gcov=no])
+AC_MSG_RESULT($use_gcov)
AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
+
AC_CONFIG_FILES([
Makefile
contrib/Makefile
diff --git a/m4/libcurl.m4 b/m4/libcurl.m4
index a9bfa2e23..01a0575cc 100644
--- a/m4/libcurl.m4
+++ b/m4/libcurl.m4
@@ -55,9 +55,13 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP])
AH_TEMPLATE([LIBCURL_PROTOCOL_DICT],[Defined if libcurl supports DICT])
AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_RTSP],[Defined if libcurl supports RTSP])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_POP3],[Defined if libcurl supports POP3])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_IMAP],[Defined if libcurl supports IMAP])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_SMTP],[Defined if libcurl supports SMTP])
AC_ARG_WITH(libcurl,
- AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
+ AC_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in PREFIX/lib and headers in PREFIX/include]),
[_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])])
if test "$_libcurl_with" != "no" ; then
@@ -71,32 +75,33 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
if test -d "$_libcurl_with" ; then
LIBCURL_CPPFLAGS="-I$withval/include"
_libcurl_ldflags="-L$withval/lib"
- AC_PATH_PROG([_libcurl_config],["$withval/bin/curl-config"])
+ AC_PATH_PROG([_libcurl_config],[curl-config],[],
+ ["$withval/bin"])
else
- AC_PATH_PROG([_libcurl_config],[curl-config])
+ AC_PATH_PROG([_libcurl_config],[curl-config],[],[$PATH])
fi
if test x$_libcurl_config != "x" ; then
AC_CACHE_CHECK([for the version of libcurl],
- [libcurl_cv_lib_curl_version],
+ [libcurl_cv_lib_curl_version],
[libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $[]2}'`])
- _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
- _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
+ _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
+ _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
if test $_libcurl_wanted -gt 0 ; then
- AC_CACHE_CHECK([for libcurl >= version $2],
- [libcurl_cv_lib_version_ok],
+ AC_CACHE_CHECK([for libcurl >= version $2],
+ [libcurl_cv_lib_version_ok],
[
- if test $_libcurl_version -ge $_libcurl_wanted ; then
- libcurl_cv_lib_version_ok=yes
- else
- libcurl_cv_lib_version_ok=no
- fi
+ if test $_libcurl_version -ge $_libcurl_wanted ; then
+ libcurl_cv_lib_version_ok=yes
+ else
+ libcurl_cv_lib_version_ok=no
+ fi
])
fi
- if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then
+ if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then
if test x"$LIBCURL_CPPFLAGS" = "x" ; then
LIBCURL_CPPFLAGS=`$_libcurl_config --cflags`
fi
@@ -104,8 +109,8 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
LIBCURL=`$_libcurl_config --libs`
# This is so silly, but Apple actually has a bug in their
- # curl-config script. Fixed in Tiger, but there are still
- # lots of Panther installs around.
+ # curl-config script. Fixed in Tiger, but there are still
+ # lots of Panther installs around.
case "${host}" in
powerpc-apple-darwin7*)
LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'`
@@ -113,18 +118,18 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
esac
fi
- # All curl-config scripts support --feature
- _libcurl_features=`$_libcurl_config --feature`
+ # All curl-config scripts support --feature
+ _libcurl_features=`$_libcurl_config --feature`
# Is it modern enough to have --protocols? (7.12.4)
- if test $_libcurl_version -ge 461828 ; then
+ if test $_libcurl_version -ge 461828 ; then
_libcurl_protocols=`$_libcurl_config --protocols`
fi
- else
+ else
_libcurl_try_link=no
- fi
+ fi
- unset _libcurl_wanted
+ unset _libcurl_wanted
fi
if test $_libcurl_try_link = yes ; then
@@ -141,7 +146,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
_libcurl_save_libs=$LIBS
LIBS="$LIBCURL $LIBS"
- AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <curl/curl.h>],[
/* Try and use a few common options to force a failure if we are
missing symbols or can't link. */
int x;
@@ -152,7 +157,7 @@ x=CURLOPT_FILE;
x=CURLOPT_ERRORBUFFER;
x=CURLOPT_STDERR;
x=CURLOPT_VERBOSE;
-]),libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
+])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
CPPFLAGS=$_libcurl_save_cppflags
LIBS=$_libcurl_save_libs
@@ -162,8 +167,8 @@ x=CURLOPT_VERBOSE;
if test $libcurl_cv_lib_curl_usable = yes ; then
- # Does curl_free() exist in this version of libcurl?
- # If not, fake it with free()
+ # Does curl_free() exist in this version of libcurl?
+ # If not, fake it with free()
_libcurl_save_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
@@ -171,8 +176,8 @@ x=CURLOPT_VERBOSE;
LIBS="$LIBS $LIBCURL"
AC_CHECK_FUNC(curl_free,,
- AC_DEFINE(curl_free,free,
- [Define curl_free() as free() if our version of curl lacks curl_free.]))
+ AC_DEFINE(curl_free,free,
+ [Define curl_free() as free() if our version of curl lacks curl_free.]))
CPPFLAGS=$_libcurl_save_cppflags
LIBS=$_libcurl_save_libs
@@ -185,34 +190,40 @@ x=CURLOPT_VERBOSE;
AC_SUBST(LIBCURL)
for _libcurl_feature in $_libcurl_features ; do
- AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1])
- eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
+ AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1])
+ eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
done
- if test "x$_libcurl_protocols" = "x" ; then
+ if test "x$_libcurl_protocols" = "x" ; then
+
+ # We don't have --protocols, so just assume that all
+ # protocols are available
+ _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
- # We don't have --protocols, so just assume that all
- # protocols are available
- _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT"
+ if test x$libcurl_feature_SSL = xyes ; then
+ _libcurl_protocols="$_libcurl_protocols HTTPS"
- if test x$libcurl_feature_SSL = xyes ; then
- _libcurl_protocols="$_libcurl_protocols HTTPS"
+ # FTPS wasn't standards-compliant until version
+ # 7.11.0 (0x070b00 == 461568)
+ if test $_libcurl_version -ge 461568; then
+ _libcurl_protocols="$_libcurl_protocols FTPS"
+ fi
+ fi
- # FTPS wasn't standards-compliant until version
- # 7.11.0
- if test $_libcurl_version -ge 461568; then
- _libcurl_protocols="$_libcurl_protocols FTPS"
- fi
- fi
- fi
+ # RTSP, IMAP, POP3 and SMTP were added in
+ # 7.20.0 (0x071400 == 463872)
+ if test $_libcurl_version -ge 463872; then
+ _libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP"
+ fi
+ fi
- for _libcurl_protocol in $_libcurl_protocols ; do
- AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1])
- eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes
+ for _libcurl_protocol in $_libcurl_protocols ; do
+ AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1])
+ eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes
done
- else
- unset LIBCURL
- unset LIBCURL_CPPFLAGS
+ else
+ unset LIBCURL
+ unset LIBCURL_CPPFLAGS
fi
fi
diff --git a/src/arm/Makefile.am b/src/arm/Makefile.am
index 3e7f27dfd..bd6e7e0e7 100644
--- a/src/arm/Makefile.am
+++ b/src/arm/Makefile.am
@@ -59,7 +59,7 @@ check_PROGRAMS = \
check_SCRIPTS = \
test_gnunet_arm.sh
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
endif
diff --git a/src/chat/Makefile.am b/src/chat/Makefile.am
index f10796c23..39a2df2a1 100644
--- a/src/chat/Makefile.am
+++ b/src/chat/Makefile.am
@@ -50,7 +50,7 @@ check_PROGRAMS = \
test_chat_private \
test_chat_private_p2p
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 1ab88033f..2faeb2357 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -47,7 +47,7 @@ check_PROGRAMS = \
test_core_quota_compliance_asymmetric_recv_limited \
test_core_api_send_to_self
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/datacache/Makefile.am b/src/datacache/Makefile.am
index 5e3919820..921d88e5f 100644
--- a/src/datacache/Makefile.am
+++ b/src/datacache/Makefile.am
@@ -81,24 +81,36 @@ libgnunet_plugin_datacache_template_la_LDFLAGS = \
if HAVE_SQLITE
+if HAVE_BENCHMARKS
+ SQLITE_BENCHMARKS = \
+ perf_datacache_postgres
+endif
SQLITE_TESTS = \
test_datacache_sqlite \
test_datacache_quota_sqlite \
- perf_datacache_sqlite
+ $(SQLITE_BENCHMARKS)
endif
if HAVE_MYSQL
+if HAVE_BENCHMARKS
+ MYSQL_BENCHMARKS = \
+ perf_datacache_postgres
+endif
MYSQL_TESTS = \
test_datacache_mysql \
test_datacache_quota_mysql \
- perf_datacache_mysql
+ $(MYSQL_BENCHMARKS)
endif
if HAVE_POSTGRES
+if HAVE_BENCHMARKS
+ POSTGRES_BENCHMARKS = \
+ perf_datacache_postgres
+endif
POSTGRES_TESTS = \
test_datacache_postgres \
test_datacache_quota_postgres \
- perf_datacache_postgres
+ $(POSTGRES_BENCHMARKS)
endif
check_PROGRAMS = \
@@ -106,7 +118,7 @@ check_PROGRAMS = \
$(MYSQL_TESTS) \
$(POSTGRES_TESTS)
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/datastore/Makefile.am b/src/datastore/Makefile.am
index 4ab887061..a3c484531 100644
--- a/src/datastore/Makefile.am
+++ b/src/datastore/Makefile.am
@@ -38,30 +38,42 @@ gnunet_service_datastore_LDADD = \
if HAVE_MYSQL
MYSQL_PLUGIN = libgnunet_plugin_datastore_mysql.la
+if HAVE_BENCHMARKS
+ MYSQL_BENCHMARKS = \
+ perf_datastore_api_mysql \
+ perf_plugin_datastore_mysql
+endif
MYSQL_TESTS = \
test_datastore_api_mysql \
test_datastore_api_management_mysql \
test_plugin_datastore_mysql \
- perf_datastore_api_mysql \
- perf_plugin_datastore_mysql
+ $(MYSQL_BENCHMARKS)
endif
if HAVE_SQLITE
SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la
+if HAVE_BENCHMARKS
+ SQLITE_BENCHMARKS = \
+ perf_datastore_api_sqlite \
+ perf_plugin_datastore_sqlite
+endif
SQLITE_TESTS = \
test_datastore_api_sqlite \
test_datastore_api_management_sqlite \
test_plugin_datastore_sqlite \
- perf_datastore_api_sqlite \
- perf_plugin_datastore_sqlite
+ $(SQLITE_BENCHMARKS)
endif
if HAVE_POSTGRES
POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la
+if HAVE_BENCHMARKS
+ POSTGRES_BENCHMARKS = \
+ perf_datastore_api_postgres \
+ perf_plugin_datastore_postgres
+endif
POSTGRES_TESTS = \
test_datastore_api_postgres \
test_datastore_api_management_postgres \
test_plugin_datastore_postgres \
- perf_datastore_api_postgres \
- perf_plugin_datastore_postgres
+ $(POSTGRES_BENCHMARKS)
endif
plugin_LTLIBRARIES = \
@@ -113,7 +125,7 @@ check_PROGRAMS = \
$(MYSQL_TESTS) \
$(POSTGRES_TESTS)
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am
index 97f81e6be..11ab7ca8b 100644
--- a/src/dht/Makefile.am
+++ b/src/dht/Makefile.am
@@ -156,7 +156,7 @@ check_PROGRAMS = \
test_dhtlog
# test_hash_operations
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = test_dht_api $(check_SCRIPTS) \
test_dht_twopeer \
test_dht_twopeer_put_get \
diff --git a/src/dv/Makefile.am b/src/dv/Makefile.am
index 9e7d9c4e4..d505e31c4 100644
--- a/src/dv/Makefile.am
+++ b/src/dv/Makefile.am
@@ -58,7 +58,7 @@ check_PROGRAMS = \
test_transport_api_dv
# test_dv_topology
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
endif
diff --git a/src/fragmentation/Makefile.am b/src/fragmentation/Makefile.am
index f00c0958c..5b1367260 100644
--- a/src/fragmentation/Makefile.am
+++ b/src/fragmentation/Makefile.am
@@ -18,7 +18,7 @@ libgnunetfragmentation_la_LIBADD = \
check_PROGRAMS = \
test_fragmentation
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am
index d433e5b66..39dce602e 100644
--- a/src/fs/Makefile.am
+++ b/src/fs/Makefile.am
@@ -134,8 +134,13 @@ gnunet_unindex_LDADD = \
gnunet_unindex_DEPENDENCIES = \
libgnunetfs.la
-
-
+if HAVE_BENCHMARKS
+ FS_BENCHMARKS = \
+ perf_gnunet_service_fs_p2p \
+ perf_gnunet_service_fs_p2p_dht \
+ perf_gnunet_service_fs_p2p_index \
+ perf_gnunet_service_fs_p2p_trust
+endif
check_PROGRAMS = \
test_fs_directory \
@@ -158,10 +163,7 @@ check_PROGRAMS = \
test_fs_uri \
test_gnunet_service_fs_migration \
test_gnunet_service_fs_p2p \
- perf_gnunet_service_fs_p2p \
- perf_gnunet_service_fs_p2p_dht \
- perf_gnunet_service_fs_p2p_index \
- perf_gnunet_service_fs_p2p_trust
+ $(FS_BENCHMARKS)
if HAVE_PYTHON_PEXPECT
@@ -173,7 +175,7 @@ check_SCRIPTS = \
endif
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = \
test_fs_directory \
test_fs_download \
diff --git a/src/hello/Makefile.am b/src/hello/Makefile.am
index 703776c65..c2bc5cd69 100644
--- a/src/hello/Makefile.am
+++ b/src/hello/Makefile.am
@@ -19,7 +19,7 @@ libgnunethello_la_LIBADD = \
check_PROGRAMS = \
test_hello
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/hostlist/Makefile.am b/src/hostlist/Makefile.am
index 560d81900..15c8f86a7 100644
--- a/src/hostlist/Makefile.am
+++ b/src/hostlist/Makefile.am
@@ -37,7 +37,7 @@ check_PROGRAMS = \
test_gnunet_daemon_hostlist_learning
if HAVE_MHD
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = \
test_gnunet_daemon_hostlist \
test_gnunet_daemon_hostlist_reconnect \
diff --git a/src/monkey/Makefile.am b/src/monkey/Makefile.am
index b1d6cb89b..4b170da58 100644
--- a/src/monkey/Makefile.am
+++ b/src/monkey/Makefile.am
@@ -92,7 +92,7 @@ check_PROGRAMS = \
test_monkey_edb
#test_gnunet_monkey
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
# TESTS = $(check_SCRIPTS)
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/peerinfo-tool/Makefile.am b/src/peerinfo-tool/Makefile.am
index b004a4732..8c5fd8fbb 100644
--- a/src/peerinfo-tool/Makefile.am
+++ b/src/peerinfo-tool/Makefile.am
@@ -25,7 +25,7 @@ check_SCRIPTS = \
test_gnunet_peerinfo.py
endif
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_SCRIPTS)
endif
diff --git a/src/peerinfo/Makefile.am b/src/peerinfo/Makefile.am
index 116095f2a..d58425730 100644
--- a/src/peerinfo/Makefile.am
+++ b/src/peerinfo/Makefile.am
@@ -33,12 +33,16 @@ gnunet_service_peerinfo_LDADD = \
$(top_builddir)/src/statistics/libgnunetstatistics.la \
$(top_builddir)/src/util/libgnunetutil.la
+if HAVE_BENCHMARKS
+ PEERINFO_BENCHMARKS = \
+ perf_peerinfo_api
+endif
check_PROGRAMS = \
test_peerinfo_api \
- perf_peerinfo_api
+ $(PEERINFO_BENCHMARKS)
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/statistics/Makefile.am b/src/statistics/Makefile.am
index 2a1d0d529..a15aba9fb 100644
--- a/src/statistics/Makefile.am
+++ b/src/statistics/Makefile.am
@@ -49,7 +49,7 @@ check_PROGRAMS = \
test_statistics_api_loop \
test_statistics_api_watch
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
endif
diff --git a/src/template/Makefile.am b/src/template/Makefile.am
index f17e48166..35a4b433e 100644
--- a/src/template/Makefile.am
+++ b/src/template/Makefile.am
@@ -28,7 +28,7 @@ gnunet_service_template_LDADD = \
check_PROGRAMS = \
test_template_api
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am
index ac57659ef..c25087d69 100644
--- a/src/testing/Makefile.am
+++ b/src/testing/Makefile.am
@@ -47,7 +47,7 @@ check_PROGRAMS = \
test_testing_topology_none \
test_testing_topology_scale_free
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = \
test_testing \
test_testing_connect \
diff --git a/src/topology/Makefile.am b/src/topology/Makefile.am
index 2fc8e50ee..3b69627e3 100644
--- a/src/topology/Makefile.am
+++ b/src/topology/Makefile.am
@@ -24,7 +24,7 @@ gnunet_daemon_topology_LDADD = \
check_PROGRAMS = \
test_gnunet_daemon_topology
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index 216fcb0cd..f68ec4315 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -234,10 +234,14 @@ libgnunet_plugin_transport_https_la_CFLAGS = \
libgnunet_plugin_transport_https_la_CPPFLAGS = \
@LIBCURL_CPPFLAGS@
+if HAVE_BENCHMARKS
+ TRANSPORT_BENCHMARKS = \
+ perf_transport_ats
+endif
check_PROGRAMS = \
test_transport_ats \
- perf_transport_ats \
+ $(TRANSPORT_BENCHMARKS) \
test_transport_api_tcp \
test_transport_api_tcp_nat \
test_transport_api_udp \
@@ -266,7 +270,7 @@ check_PROGRAMS = \
$(WLAN_UREL_TEST)
# TODO: add tests for nat, etc.
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = \
test_transport_ats \
perf_transport_ats \
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 3a03516db..6c85e4064 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -114,6 +114,11 @@ libgnunet_plugin_test_la_SOURCES = \
libgnunet_plugin_test_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
+if HAVE_BENCHMARKS
+ BENCHMARKS = \
+ perf_crypto_hash
+endif
+
check_PROGRAMS = \
test_bio \
test_client \
@@ -158,10 +163,10 @@ check_PROGRAMS = \
test_service \
test_strings \
test_time \
- perf_crypto_hash \
+ $(BENCHMARKS) \
test_os_start_process
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/vpn/Makefile.am b/src/vpn/Makefile.am
index 5430ba3b9..f36031f7b 100644
--- a/src/vpn/Makefile.am
+++ b/src/vpn/Makefile.am
@@ -70,7 +70,7 @@ gnunet_daemon_exit_LDADD = \
#check_PROGRAMS = \
# test_XXX
-if !DISABLE_TEST_RUN
+if ENABLE_TEST_RUN
#TESTS = \
# test_transport_api_tcp
endif