]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] a quickhack fix to discheck failure in dhcp6/tests.
authorJINMEI Tatuya <jinmei@isc.org>
Thu, 6 Oct 2011 22:56:56 +0000 (15:56 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Thu, 6 Oct 2011 22:56:56 +0000 (15:56 -0700)
okayed on jabber

src/bin/dhcp6/tests/Makefile.am
src/bin/dhcp6/tests/iface_mgr_unittest.cc

index 873b21fc008bac30d94f87909a02ec46501142e7..ae9d8e31735485506ee69ce13b4eaf7588aa5412 100644 (file)
@@ -29,9 +29,11 @@ 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/lib/testutils/testdata\"
+AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/bin/dhcp6/tests\"
 AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
 
+CLEANFILES = $(builddir)/interfaces.txt
+
 AM_CXXFLAGS = $(B10_CXXFLAGS)
 
 if USE_STATIC_LINK
index c8301eb72356cf2e608baea71740f81f37e606f1..a726511390b5a2fc4d7e25ed0eee75ce59b899dd 100644 (file)
@@ -29,6 +29,8 @@ using namespace isc;
 using namespace isc::asiolink;
 
 namespace {
+const char* const INTERFACE_FILE = TEST_DATA_BUILDDIR "/interfaces.txt";
+
 class NakedIfaceMgr: public IfaceMgr {
     // "naked" Interface Manager, exposes internal fields
 public:
@@ -114,7 +116,7 @@ TEST_F(IfaceMgrTest, detectIfaces) {
     // test detects that interfaces can be detected
     // there is no code for that now, but interfaces are
     // read from file
-    fstream fakeifaces("interfaces.txt", ios::out|ios::trunc);
+    fstream fakeifaces(INTERFACE_FILE, ios::out|ios::trunc);
     fakeifaces << "eth0 fe80::1234";
     fakeifaces.close();
 
@@ -210,7 +212,7 @@ TEST_F(IfaceMgrTest, DISABLED_sendReceive) {
     // testing socket operation in a portable way is tricky
     // without interface detection implemented
 
-    fstream fakeifaces("interfaces.txt", ios::out|ios::trunc);
+    fstream fakeifaces(INTERFACE_FILE, ios::out|ios::trunc);
     fakeifaces << "lo ::1";
     fakeifaces.close();