Commit d119c315 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[master] a quickhack fix to discheck failure in dhcp6/tests.

okayed on jabber
parent 31830397
......@@ -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
......
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment