BIND 10 trac2957, updated. 42e6736faa21f98de53a4ac0bc52306041581d91 [2957] Fixed path to dhcp-ddns.spec for spec file unit test, so file can be located properly. Unit test was failing during distcheck.

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jun 20 13:45:12 UTC 2013


The branch, trac2957 has been updated
       via  42e6736faa21f98de53a4ac0bc52306041581d91 (commit)
      from  be6122f520871344324be1ceb9f118195d508bba (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 42e6736faa21f98de53a4ac0bc52306041581d91
Author: Thomas Markwalder <tmark at debian-tkm-01.tmark>
Date:   Thu Jun 20 09:39:50 2013 -0400

    [2957] Fixed path to dhcp-ddns.spec for spec file unit test, so file
    can be located properly. Unit test was failing during distcheck.

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                                       |    1 +
 src/bin/d2/tests/d2_cfg_mgr_unittests.cc           |    8 +++++++-
 .../d2/tests/test_data_files_config.h.in}          |    5 +++--
 3 files changed, 11 insertions(+), 3 deletions(-)
 copy src/{lib/config/tests/data_def_unittests_config.h.in => bin/d2/tests/test_data_files_config.h.in} (84%)

-----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index fc216c4..3b068c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1388,6 +1388,7 @@ AC_OUTPUT([doc/version.ent
            src/bin/dhcp4/spec_config.h.pre
            src/bin/dhcp6/spec_config.h.pre
            src/bin/d2/spec_config.h.pre
+           src/bin/d2/tests/test_data_files_config.h
            src/bin/tests/process_rename_test.py
            src/lib/config/tests/data_def_unittests_config.h
            src/lib/python/isc/config/tests/config_test
diff --git a/src/bin/d2/tests/d2_cfg_mgr_unittests.cc b/src/bin/d2/tests/d2_cfg_mgr_unittests.cc
index 77c14bb..6727c12 100644
--- a/src/bin/d2/tests/d2_cfg_mgr_unittests.cc
+++ b/src/bin/d2/tests/d2_cfg_mgr_unittests.cc
@@ -16,6 +16,7 @@
 #include <d2/d2_config.h>
 #include <d2/d2_cfg_mgr.h>
 #include <d_test_stubs.h>
+#include <test_data_files_config.h>
 
 #include <boost/foreach.hpp>
 #include <gtest/gtest.h>
@@ -26,6 +27,10 @@ using namespace isc::d2;
 
 namespace {
 
+std::string specfile(const std::string& name) {
+    return (std::string(D2_SRC_DIR) + "/" + name);
+}
+
 /// @brief Test fixture class for testing D2CfgMgr class.
 /// It maintains an member instance of D2CfgMgr and provides methods for
 /// converting JSON strings to configuration element sets, checking parse
@@ -49,7 +54,8 @@ public:
 /// Verifies that the BIND10 DHCP-DDNS configuration specification file
 //  is valid.
 TEST(D2SpecTest, basicSpecTest) {
-    ASSERT_NO_THROW(isc::config::moduleSpecFromFile("../dhcp-ddns.spec"));
+    ASSERT_NO_THROW(isc::config::
+                    moduleSpecFromFile(specfile("dhcp-ddns.spec")));
 }
 
 /// @brief Convenience function which compares the contents of the given
diff --git a/src/bin/d2/tests/test_data_files_config.h.in b/src/bin/d2/tests/test_data_files_config.h.in
new file mode 100644
index 0000000..6064d3d
--- /dev/null
+++ b/src/bin/d2/tests/test_data_files_config.h.in
@@ -0,0 +1,17 @@
+// Copyright (C) 2009  Internet Systems Consortium, Inc. ("ISC")   
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+/// @brief Path to D2 source dir so tests against the dhcp-ddns.spec file
+/// can find it reliably.
+#define D2_SRC_DIR "@abs_top_srcdir@/src/bin/d2"



More information about the bind10-changes mailing list