Parcourir la source

[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.
Thomas Markwalder il y a 9 ans
Parent
commit
ec0d87d2d8

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 0
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)
 

+ 1 - 1
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.