mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 09:57:41 +00:00
[#2071] propagate all flags from configure to distcheck
This commit is contained in:
parent
602860f1fc
commit
d1d4aefec6
27
Makefile.am
27
Makefile.am
@ -15,6 +15,11 @@ DISTCHECK_PERFDHCP_CONFIGURE_FLAG=@DISTCHECK_PERFDHCP_CONFIGURE_FLAG@
|
||||
DISTCHECK_KEA_SHELL_CONFIGURE_FLAG=@DISTCHECK_KEA_SHELL_CONFIGURE_FLAG@
|
||||
DISTCHECK_PREMIUM_CONFIGURE_FLAG=@DISTCHECK_PREMIUM_CONFIGURE_FLAG@
|
||||
DISTCHECK_CONTRIB_CONFIGURE_FLAG=@DISTCHECK_CONTRIB_CONFIGURE_FLAG@
|
||||
DISTCHECK_MYSQL_CONFIGURE_FLAG=@DISTCHECK_MYSQL_CONFIGURE_FLAG@
|
||||
DISTCHECK_PGSQL_CONFIGURE_FLAG=@DISTCHECK_PGSQL_CONFIGURE_FLAG@
|
||||
DISTCHECK_GSSAPI_CONFIGURE_FLAG=@DISTCHECK_GSSAPI_CONFIGURE_FLAG@
|
||||
DISTCHECK_LIBYANG_CONFIGURE_FLAG=@DISTCHECK_LIBYANG_CONFIGURE_FLAG@
|
||||
DISTCHECK_SYSREPO_CONFIGURE_FLAG=@DISTCHECK_SYSREPO_CONFIGURE_FLAG@
|
||||
|
||||
OVERALL_COVERAGE_DIR=$(abs_top_builddir)/coverage-cpp-html
|
||||
|
||||
@ -47,6 +52,21 @@ DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_PREMIUM_CONFIGURE_FLAG)
|
||||
# Keep the contrib config
|
||||
DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_CONTRIB_CONFIGURE_FLAG)
|
||||
|
||||
# Keep the mysql config
|
||||
DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_MYSQL_CONFIGURE_FLAG)
|
||||
|
||||
# Keep the pgsql config
|
||||
DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_PGSQL_CONFIGURE_FLAG)
|
||||
|
||||
# Keep the gssapi config
|
||||
DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_GSSAPI_CONFIGURE_FLAG)
|
||||
|
||||
# Keep the libyang config
|
||||
DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_LIBYANG_CONFIGURE_FLAG)
|
||||
|
||||
# Keep the sysrepo config
|
||||
DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_SYSREPO_CONFIGURE_FLAG)
|
||||
|
||||
dist_doc_DATA = AUTHORS COPYING ChangeLog README CONTRIBUTING.md platforms.rst code_of_conduct.md
|
||||
|
||||
.PHONY: check-valgrind check-valgrind-suppress
|
||||
@ -114,9 +134,10 @@ endif
|
||||
--ignore-errors gcov,source,graph \
|
||||
--output report.info; \
|
||||
sed --in-place --expression "s|$(abs_top_srcdir)|$(abs_top_builddir)|g" report.info; \
|
||||
"$(GENHTML)" --frames --show-details --title 'Kea code coverage report' --legend \
|
||||
--function-coverage --ignore-errors source --demangle-cpp \
|
||||
--output "$(OVERALL_COVERAGE_DIR)" report.info; \
|
||||
"$(GENHTML)" \
|
||||
--frames --show-details --title 'Kea code coverage report' --legend \
|
||||
--function-coverage --ignore-errors source --demangle-cpp \
|
||||
--output "$(OVERALL_COVERAGE_DIR)" report.info; \
|
||||
printf "Generated C++ code coverage report in HTML at %s.\n" "$(OVERALL_COVERAGE_DIR)"; \
|
||||
else \
|
||||
echo "C++ code coverage not enabled at configuration time." ; \
|
||||
|
@ -677,11 +677,14 @@ elif test "${mysql_config}" != "no" ; then
|
||||
MYSQL_CONFIG="${withval}"
|
||||
fi
|
||||
|
||||
DISTCHECK_MYSQL_CONFIGURE_FLAG=
|
||||
if test "$MYSQL_CONFIG" != "" ; then
|
||||
if test -d "$MYSQL_CONFIG" -o ! -x "$MYSQL_CONFIG" ; then
|
||||
AC_MSG_ERROR([MySQL dependencies cannot be found. Please install MySQL libraries or point --with-mysql to mysql_config program if it is located in non-default directory, eg. --with-mysql=/opt/mysql/bin/mysql_config.])
|
||||
fi
|
||||
|
||||
DISTCHECK_MYSQL_CONFIGURE_FLAG="--with-mysql=$MYSQL_CONFIG"
|
||||
|
||||
MYSQL_CPPFLAGS=`$MYSQL_CONFIG --cflags`
|
||||
MYSQL_LIBS=`$MYSQL_CONFIG --libs`
|
||||
MYSQL_LIBS="$MYSQL_LIBS $CRYPTO_LIBS"
|
||||
@ -689,6 +692,7 @@ if test "$MYSQL_CONFIG" != "" ; then
|
||||
|
||||
AC_SUBST(MYSQL_CPPFLAGS)
|
||||
AC_SUBST(MYSQL_LIBS)
|
||||
AC_SUBST(DISTCHECK_MYSQL_CONFIGURE_FLAG)
|
||||
|
||||
# Check that a simple program using MySQL functions can compile and link.
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
@ -757,11 +761,14 @@ elif test "${pg_config}" != "no" ; then
|
||||
PG_CONFIG="${withval}"
|
||||
fi
|
||||
|
||||
DISTCHECK_PGSQL_CONFIGURE_FLAG=
|
||||
if test "$PG_CONFIG" != "" ; then
|
||||
if test -d "$PG_CONFIG" -o ! -x "$PG_CONFIG" ; then
|
||||
AC_MSG_ERROR([PostgreSQL dependencies cannot be found. Please install PostgreSQL libraries or point --with-pgsql to pg_config program if it is located in non-default directory, eg. --with-pgsql=/opt/pgsql/bin/pg_config.])
|
||||
fi
|
||||
|
||||
DISTCHECK_PGSQL_CONFIGURE_FLAG="--with-pgsql=$PG_CONFIG"
|
||||
|
||||
PGSQL_CPPFLAGS=`$PG_CONFIG --cppflags`
|
||||
PGSQL_INCLUDEDIR=`$PG_CONFIG --includedir`
|
||||
PGSQL_INCLUDEDIR_SERVER=`$PG_CONFIG --includedir-server`
|
||||
@ -772,6 +779,7 @@ if test "$PG_CONFIG" != "" ; then
|
||||
|
||||
AC_SUBST(PGSQL_CPPFLAGS)
|
||||
AC_SUBST(PGSQL_LIBS)
|
||||
AC_SUBST(DISTCHECK_PGSQL_CONFIGURE_FLAG)
|
||||
|
||||
# Check that a simple program using PostgreSQL functions can compile and link.
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
|
@ -188,7 +188,6 @@ update-python-dependencies: ./src/requirements.in
|
||||
|
||||
clean-local:
|
||||
rm -rf $(sphinxbuilddir)
|
||||
rm -f $(srcdir)/mes-files.txt $(srcdir)/api-files.txt
|
||||
rm -f $(srcdir)/kea-messages.rst $(srcdir)/api.rst
|
||||
rm -f $(srcdir)/arm/platforms.rst
|
||||
|
||||
|
@ -6906,7 +6906,7 @@ All supported parameters can be configured via the ``cb_cmds`` hook library
|
||||
described in the :ref:`hooks-cb-cmds` section. The general rule is that
|
||||
scalar global parameters are set using
|
||||
``remote-global-parameter4-set``; shared-network-specific parameters
|
||||
are set using ``remote-network4-set``; and subnet- and pool-level
|
||||
are set using ``remote-network4-set``; and subnet-level and pool-level
|
||||
parameters are set using ``remote-subnet4-set``. Whenever
|
||||
there is an exception to this general rule, it is highlighted in the
|
||||
table. Non-scalar global parameters have dedicated commands; for example,
|
||||
|
@ -13,6 +13,7 @@ AC_ARG_WITH([gssapi],
|
||||
ENABLE_GSSAPI=no
|
||||
GSSAPI_CFLAGS=
|
||||
GSSAPI_LIBS=
|
||||
DISTCHECK_GSSAPI_CONFIGURE_FLAG="--with-gssapi=$gssapi_path"
|
||||
|
||||
AC_MSG_CHECKING([for gssapi support])
|
||||
if test "x$gssapi_path" = "x" ; then
|
||||
@ -86,6 +87,7 @@ fi
|
||||
|
||||
AC_SUBST(GSSAPI_CFLAGS)
|
||||
AC_SUBST(GSSAPI_LIBS)
|
||||
AC_SUBST(DISTCHECK_GSSAPI_CONFIGURE_FLAG)
|
||||
AM_CONDITIONAL([HAVE_GSSAPI], [test $ENABLE_GSSAPI = "yes"])
|
||||
|
||||
])dnl AX_GSS_API
|
||||
|
@ -4,10 +4,14 @@ AC_DEFUN([AX_SYSREPO], [
|
||||
[AS_HELP_STRING([--with-libyang[[=PATH]]], [optional path to the libyang installation directory])],
|
||||
[with_libyang="${withval}"])
|
||||
|
||||
DISTCHECK_LIBYANG_CONFIGURE_FLAG="--with-libyang=$with_libyang"
|
||||
|
||||
AC_ARG_WITH([sysrepo],
|
||||
[AS_HELP_STRING([--with-sysrepo[[=PATH]]], [optional path to the sysrepo installation directory])],
|
||||
[with_sysrepo="${withval}"])
|
||||
|
||||
DISTCHECK_SYSREPO_CONFIGURE_FLAG="--with-sysrepo=$with_sysrepo"
|
||||
|
||||
# If --with-libyang was omitted, assume it was passed and give it the value
|
||||
# from --with-sysrepo.
|
||||
if test -z "${with_libyang}"; then
|
||||
@ -220,4 +224,6 @@ AC_DEFUN([AX_SYSREPO], [
|
||||
AC_SUBST(SRPD_PLUGINS_PATH)
|
||||
AC_SUBST(SYSREPO_VERSION)
|
||||
AC_SUBST(SYSREPOCPP_VERSION)
|
||||
AC_SUBST(DISTCHECK_LIBYANG_CONFIGURE_FLAG)
|
||||
AC_SUBST(DISTCHECK_SYSREPO_CONFIGURE_FLAG)
|
||||
])
|
||||
|
@ -1,3 +1,3 @@
|
||||
EXTRA_DIST = \
|
||||
lease4_dump_test.reference.csv \
|
||||
lease6_dump_test.reference.csv
|
||||
lease4_dump_test.reference.csv \
|
||||
lease6_dump_test.reference.csv
|
||||
|
@ -7,7 +7,7 @@ EXTRA_DIST += testdata/hiddens
|
||||
EXTRA_DIST += testdata/hiddenu
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
|
||||
# Shell tests
|
||||
SHTESTS = ca_process_tests.sh
|
||||
|
@ -6,7 +6,7 @@ EXTRA_DIST += testdata/d2_cfg_tests.json
|
||||
EXTRA_DIST += testdata/get_config.json
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
|
||||
# Shell tests
|
||||
SHTESTS = d2_process_tests.sh
|
||||
|
@ -4,7 +4,7 @@ SUBDIRS = .
|
||||
EXTRA_DIST = get_config_unittest.cc.skel
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
|
||||
# Shell tests
|
||||
SHTESTS = dhcp4_process_tests.sh
|
||||
|
@ -4,7 +4,7 @@ SUBDIRS = .
|
||||
EXTRA_DIST = get_config_unittest.cc.skel
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
|
||||
# Shell tests
|
||||
SHTESTS = dhcp6_process_tests.sh
|
||||
|
@ -3,8 +3,9 @@ SUBDIRS = . tests
|
||||
# Install keactrl in sbin and the keactrl.conf required by the keactrl
|
||||
# in etc. keactrl will look for its configuration file in the etc folder.
|
||||
sbin_SCRIPTS = keactrl
|
||||
KEA_CONFIGFILES = kea-dhcp4.conf kea-dhcp6.conf kea-dhcp-ddns.conf \
|
||||
kea-ctrl-agent.conf
|
||||
KEA_CONFIGFILES = \
|
||||
kea-dhcp4.conf kea-dhcp6.conf kea-dhcp-ddns.conf kea-ctrl-agent.conf
|
||||
|
||||
if HAVE_SYSREPO
|
||||
KEA_CONFIGFILES += kea-netconf.conf
|
||||
endif
|
||||
@ -13,9 +14,10 @@ CONFIGFILES = keactrl.conf $(KEA_CONFIGFILES)
|
||||
|
||||
DISTCLEANFILES = keactrl keactrl.conf
|
||||
CLEANFILES = $(KEA_CONFIGFILES)
|
||||
EXTRA_DIST = keactrl.in keactrl.conf.in kea-dhcp4.conf.pre \
|
||||
kea-dhcp6.conf.pre kea-dhcp-ddns.conf.pre \
|
||||
kea-ctrl-agent.conf.pre kea-netconf.conf.pre
|
||||
EXTRA_DIST = \
|
||||
keactrl.in keactrl.conf.in kea-dhcp4.conf.pre \
|
||||
kea-dhcp6.conf.pre kea-dhcp-ddns.conf.pre \
|
||||
kea-ctrl-agent.conf.pre kea-netconf.conf.pre
|
||||
|
||||
# *.conf files are not really sources used for building other targets, but we need
|
||||
# these files to be generated before make install is called.
|
||||
@ -24,23 +26,23 @@ BUILT_SOURCES = $(KEA_CONFIGFILES)
|
||||
|
||||
kea-dhcp4.conf: kea-dhcp4.conf.pre
|
||||
$(top_builddir)/tools/path_replacer.sh \
|
||||
$(top_srcdir)/src/bin/keactrl/kea-dhcp4.conf.pre $@
|
||||
$(top_srcdir)/src/bin/keactrl/kea-dhcp4.conf.pre $@
|
||||
|
||||
kea-dhcp6.conf: kea-dhcp6.conf.pre
|
||||
$(top_builddir)/tools/path_replacer.sh \
|
||||
$(top_srcdir)/src/bin/keactrl/kea-dhcp6.conf.pre $@
|
||||
$(top_srcdir)/src/bin/keactrl/kea-dhcp6.conf.pre $@
|
||||
|
||||
kea-dhcp-ddns.conf: kea-dhcp-ddns.conf.pre
|
||||
$(top_builddir)/tools/path_replacer.sh \
|
||||
$(top_srcdir)/src/bin/keactrl/kea-dhcp-ddns.conf.pre $@
|
||||
$(top_srcdir)/src/bin/keactrl/kea-dhcp-ddns.conf.pre $@
|
||||
|
||||
kea-ctrl-agent.conf: kea-ctrl-agent.conf.pre
|
||||
$(top_builddir)/tools/path_replacer.sh \
|
||||
$(top_srcdir)/src/bin/keactrl/kea-ctrl-agent.conf.pre $@
|
||||
$(top_srcdir)/src/bin/keactrl/kea-ctrl-agent.conf.pre $@
|
||||
|
||||
kea-netconf.conf: kea-netconf.conf.pre
|
||||
$(top_builddir)/tools/path_replacer.sh \
|
||||
$(top_srcdir)/src/bin/keactrl/kea-netconf.conf.pre $@
|
||||
$(top_srcdir)/src/bin/keactrl/kea-netconf.conf.pre $@
|
||||
|
||||
if INSTALL_CONFIGURATIONS
|
||||
|
||||
|
@ -15,7 +15,7 @@ AM_LDFLAGS = -static
|
||||
endif
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
|
||||
TESTS =
|
||||
if HAVE_GTEST
|
||||
|
@ -24,7 +24,7 @@ AM_LDFLAGS = -static
|
||||
endif
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
|
||||
TESTS =
|
||||
if HAVE_GTEST
|
||||
|
@ -17,7 +17,7 @@ CLEANFILES = *.gcno *.gcda
|
||||
CLEANFILES += test1.hex test2.hex test3.hex test4.hex test5.hex
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
|
||||
TESTS =
|
||||
if HAVE_GTEST
|
||||
|
@ -17,7 +17,7 @@ CLEANFILES = *.gcno *.gcda
|
||||
DISTCLEANFILES = test_libraries.h
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
|
||||
TESTS =
|
||||
if HAVE_GTEST
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <dhcpsrv/lease_mgr_factory.h>
|
||||
#include <dhcpsrv/mysql_lease_mgr.h>
|
||||
#include <dhcpsrv/testutils/test_utils.h>
|
||||
#include <dhcpsrv/testutils/mysql_generic_backend_unittest.h>
|
||||
#include <dhcpsrv/tests/generic_lease_mgr_unittest.h>
|
||||
#include <exceptions/exceptions.h>
|
||||
#include <mysql/mysql_connection.h>
|
||||
@ -1073,6 +1074,25 @@ TEST_F(MySqlLeaseMgrTest, leaseStatsQueryAttribution6MultiThreading) {
|
||||
testLeaseStatsQueryAttribution6();
|
||||
}
|
||||
|
||||
/// @brief This test is a basic check for the generic backend test class,
|
||||
/// rather than any production code check.
|
||||
TEST_F(MySqlGenericBackendTest, leaseCount) {
|
||||
|
||||
// Create database connection parameter list
|
||||
DatabaseConnection::ParameterMap params;
|
||||
params["name"] = "keatest";
|
||||
params["user"] = "keatest";
|
||||
params["password"] = "keatest";
|
||||
|
||||
// Create and open the database connection
|
||||
MySqlConnection conn(params);
|
||||
conn.openDatabase();
|
||||
|
||||
// Check that the countRows is working. It's used extensively in other
|
||||
// tests, so basic check is enough here.
|
||||
EXPECT_EQ(0, countRows(conn, "lease4"));
|
||||
}
|
||||
|
||||
/// @brief Checks that no exceptions are thrown when inquiring about JSON
|
||||
/// support and prints an informative message.
|
||||
TEST_F(MySqlLeaseMgrTest, isJsonSupported) {
|
||||
|
@ -6,8 +6,10 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <dhcpsrv/testutils/mysql_generic_backend_unittest.h>
|
||||
#include <mysql/testutils/mysql_schema.h>
|
||||
|
||||
using namespace isc::db;
|
||||
using namespace isc::db::test;
|
||||
|
||||
namespace isc {
|
||||
namespace dhcp {
|
||||
@ -15,6 +17,7 @@ namespace test {
|
||||
|
||||
MySqlGenericBackendTest::MySqlGenericBackendTest()
|
||||
: GenericBackendTest() {
|
||||
createMySQLSchema();
|
||||
}
|
||||
|
||||
size_t
|
||||
|
@ -6,8 +6,10 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <dhcpsrv/testutils/pgsql_generic_backend_unittest.h>
|
||||
#include <pgsql/testutils/pgsql_schema.h>
|
||||
|
||||
using namespace isc::db;
|
||||
using namespace isc::db::test;
|
||||
|
||||
namespace isc {
|
||||
namespace dhcp {
|
||||
@ -15,6 +17,7 @@ namespace test {
|
||||
|
||||
PgSqlGenericBackendTest::PgSqlGenericBackendTest()
|
||||
: GenericBackendTest() {
|
||||
createPgSQLSchema();
|
||||
}
|
||||
|
||||
size_t
|
||||
|
@ -38,8 +38,9 @@ if HAVE_GTEST
|
||||
# to unexpected errors. For this reason, the --enable-static-link option is
|
||||
# ignored for unit tests built here.
|
||||
|
||||
noinst_LTLIBRARIES = libnvl.la libivl.la libfxl.la libbcl.la liblcl.la \
|
||||
liblecl.la libucl.la libfcl.la libpcl.la libacl.la
|
||||
noinst_LTLIBRARIES = \
|
||||
libnvl.la libivl.la libfxl.la libbcl.la liblcl.la \
|
||||
liblecl.la libucl.la libfcl.la libpcl.la libacl.la
|
||||
|
||||
# -rpath /nowhere is a hack to trigger libtool to not create a
|
||||
# convenience archive, resulting in shared modules
|
||||
|
@ -15,7 +15,7 @@ endif
|
||||
CLEANFILES = *.gcno *.gcda
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
|
||||
TESTS =
|
||||
if HAVE_GTEST
|
||||
|
@ -18,7 +18,7 @@ CLEANFILES = *.gcno *.gcda
|
||||
CLEANFILES += *.csv
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
$(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
|
||||
|
||||
TESTS =
|
||||
if HAVE_GTEST
|
||||
|
Loading…
x
Reference in New Issue
Block a user