From: Thomas Markwalder Date: Fri, 19 Jun 2015 15:04:12 +0000 (-0400) Subject: [master] Fixed distcheck failures/ X-Git-Tag: trac3910_base~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec0d87d2d83719201973341fc02d99eefa940cf4;p=thirdparty%2Fkea.git [master] Fixed distcheck failures/ Unit tests in lib/config/tests and bin/dhcp4/tests were attempting to write to TEST_DATA_DIR rather than TEST_DATA_BUILDDIR, make distcheck to fail. --- diff --git a/src/bin/dhcp4/tests/Makefile.am b/src/bin/dhcp4/tests/Makefile.am index 680bef4572..2752ecdef9 100644 --- a/src/bin/dhcp4/tests/Makefile.am +++ b/src/bin/dhcp4/tests/Makefile.am @@ -22,7 +22,7 @@ AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc AM_CPPFLAGS += -I$(top_srcdir)/src/lib/asiolink AM_CPPFLAGS += $(BOOST_INCLUDES) AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(abs_top_srcdir)/src/lib/testutils/testdata\" -AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/bin/dhcp6/tests\" +AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/bin/dhcp4/tests\" AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\" CLEANFILES = $(builddir)/interfaces.txt $(builddir)/logger_lockfile diff --git a/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc b/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc index 55973b63a1..c766a540e6 100644 --- a/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc +++ b/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc @@ -274,7 +274,7 @@ TEST_F(CtrlDhcpv4SrvTest, commandsRegistration) { /// other unit-tests. TEST_F(CtrlDhcpv4SrvTest, DISABLED_commandSocketBasic) { - string socket_path = string(TEST_DATA_DIR) + "/kea4.sock"; + string socket_path = string(TEST_DATA_BUILDDIR) + "/kea4.sock"; ::remove(socket_path.c_str()); // Just a simple config. The important part here is the socket diff --git a/src/lib/config/tests/Makefile.am b/src/lib/config/tests/Makefile.am index 820135d10f..3a0e0fd34f 100644 --- a/src/lib/config/tests/Makefile.am +++ b/src/lib/config/tests/Makefile.am @@ -3,6 +3,7 @@ SUBDIRS = testdata . AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib AM_CPPFLAGS += $(BOOST_INCLUDES) AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(abs_top_srcdir)/src/lib/testutils/testdata\" +AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/lib/config/tests\" AM_CXXFLAGS = $(KEA_CXXFLAGS) diff --git a/src/lib/config/tests/command_socket_factory_unittests.cc b/src/lib/config/tests/command_socket_factory_unittests.cc index cafe285328..a43a0e067a 100644 --- a/src/lib/config/tests/command_socket_factory_unittests.cc +++ b/src/lib/config/tests/command_socket_factory_unittests.cc @@ -44,7 +44,7 @@ public: }; const std::string CommandSocketFactoryTest::SOCKET_NAME = - std::string(TEST_DATA_DIR) + "/test-socket"; + std::string(TEST_DATA_BUILDDIR) + "/test-socket"; TEST_F(CommandSocketFactoryTest, unixCreate) { // Null pointer is obviously a bad idea.