Browse Source

[2480] define TEST_OWN_DATA_BUILDDIR separately; OWN_DATA_DIR is needed in src.

JINMEI Tatuya 12 years ago
parent
commit
5d2f35c760
2 changed files with 5 additions and 3 deletions
  1. 2 1
      src/bin/auth/tests/Makefile.am
  2. 3 2
      src/bin/auth/tests/query_unittest.cc

+ 2 - 1
src/bin/auth/tests/Makefile.am

@@ -7,7 +7,8 @@ AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc
 AM_CPPFLAGS += $(BOOST_INCLUDES)
 AM_CPPFLAGS += -DAUTH_OBJ_DIR=\"$(abs_top_builddir)/src/bin/auth\"
 AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(abs_top_srcdir)/src/lib/testutils/testdata\"
-AM_CPPFLAGS += -DTEST_OWN_DATA_DIR=\"$(abs_builddir)/testdata\"
+AM_CPPFLAGS += -DTEST_OWN_DATA_DIR=\"$(abs_srcdir)/testdata\"
+AM_CPPFLAGS += -DTEST_OWN_DATA_BUILDDIR=\"$(abs_builddir)/testdata\"
 AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/lib/testutils/testdata\"
 AM_CPPFLAGS += -DDSRC_DIR=\"$(abs_top_builddir)/src/lib/datasrc\"
 AM_CPPFLAGS += -DPLUGIN_DATA_PATH=\"$(abs_top_builddir)/src/bin/cfgmgr/plugins\"

+ 3 - 2
src/bin/auth/tests/query_unittest.cc

@@ -748,7 +748,7 @@ createDataSrcClientList(DataSrcType type, DataSourceClient& client) {
                             "[{\"type\": \"MasterFiles\","
                             "  \"cache-enable\": true, "
                             "  \"params\": {\"example.com\": \"" +
-                            string(TEST_OWN_DATA_DIR "/example.zone") +
+                            string(TEST_OWN_DATA_BUILDDIR "/example.zone") +
                             "\"}}]"), true);
         return (list);
     case SQLITE3:
@@ -758,7 +758,8 @@ createDataSrcClientList(DataSrcType type, DataSourceClient& client) {
                             "  \"cache-enable\": false, "
                             "  \"cache-zones\": [], "
                             "  \"params\": {\"database_file\": \"" +
-                            string(TEST_OWN_DATA_DIR "/example-base.sqlite3") +
+                            string(TEST_OWN_DATA_BUILDDIR
+                                   "/example-base.sqlite3") +
                             "\"}}]"), true);
          return (list);
     }