]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1704] Use top_builddir during tests as top_srcdir may not be writable
authorMukund Sivaraman <muks@isc.org>
Thu, 24 May 2012 07:41:37 +0000 (13:11 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 24 May 2012 07:41:37 +0000 (13:11 +0530)
src/lib/log/tests/Makefile.am
src/lib/log/tests/console_test.sh.in
src/lib/log/tests/destination_test.sh.in
src/lib/log/tests/init_logger_test.sh.in
src/lib/log/tests/local_file_test.sh.in
src/lib/log/tests/run_initializer_unittests.cc
src/lib/log/tests/run_unittests.cc
src/lib/log/tests/severity_test.sh.in
src/lib/python/isc/log/tests/Makefile.am
src/lib/util/tests/Makefile.am
src/lib/util/tests/run_unittests.cc

index 8d53aad602c67a8ca6f2854b9d6c6c71b10ca4ac..844ef956bab4c3b08cfd536f2b332f79054325bb 100644 (file)
@@ -2,7 +2,7 @@ SUBDIRS = .
 
 AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
 AM_CPPFLAGS += $(BOOST_INCLUDES)
-AM_CPPFLAGS += -DTOP_SRCDIR=\"${abs_top_srcdir}\"
+AM_CPPFLAGS += -DTOP_BUILDDIR=\"${abs_top_builddir}\"
 AM_CXXFLAGS = $(B10_CXXFLAGS)
 AM_LDADD    =
 AM_LDFLAGS  =
index 2b3e6ace0a5cf18cbf8f4550bad6a21eff69efcf..5540b26906aa1f494c427cde3be52e300679b2d4 100755 (executable)
@@ -16,7 +16,7 @@
 # The logger supports the idea of a "console" logger than logs to either stdout
 # or stderr.  This test checks that both these options work.
 
-export B10_FROM_SOURCE=@abs_top_srcdir@
+export B10_FROM_SOURCE=@abs_top_builddir@
 
 testname="Console output test"
 echo $testname
index 722b9a528dca7c08459b31e77741fc74b94f593d..43cb02aaf99bce4cb4d638fb2276721b2050a14f 100755 (executable)
@@ -15,7 +15,7 @@
 
 # Checks that the logger will route messages to the chosen destination.
 
-export B10_FROM_SOURCE=@abs_top_srcdir@
+export B10_FROM_SOURCE=@abs_top_builddir@
 
 testname="Destination test"
 echo $testname
index 5e05531ef6f233f4bd59efac02294459a1da7cfe..3710258f4a3fed1f3240f4892ee19081d198f8b4 100755 (executable)
@@ -16,7 +16,7 @@
 # Checks that the initLogger() call uses for unit tests respects the setting of
 # the environment variables.
 
-export B10_FROM_SOURCE=@abs_top_srcdir@
+export B10_FROM_SOURCE=@abs_top_builddir@
 
 testname="initLogger test"
 echo $testname
index 6ee4aec1757f7982760ac5b0675f021565980bfd..8d28eef3b665aa3b896c4cb7aca8e1c48512eef4 100755 (executable)
@@ -16,7 +16,7 @@
 # Checks that a local message file can override the definitions in the message
 # dictionary.
 
-export B10_FROM_SOURCE=@abs_top_srcdir@
+export B10_FROM_SOURCE=@abs_top_builddir@
 
 testname="Local message file test"
 echo $testname
index aadfa4922b2c71583102b4c757c7e8df341989fb..cd069d8316d06a4509869c35a030d126b28d64d8 100644 (file)
@@ -21,6 +21,6 @@
 int
 main(int argc, char* argv[]) {
     ::testing::InitGoogleTest(&argc, argv);
-    setenv("B10_FROM_SOURCE", TOP_SRCDIR, 1);
+    setenv("B10_FROM_SOURCE", TOP_BUILDDIR, 1);
     return (isc::util::unittests::run_all());
 }
index 1376a9179d99ecef0136607b6640a575a5da94ae..2b4d9ea9ff38886bba9a52f6b65ff6a9293be692 100644 (file)
@@ -21,7 +21,7 @@
 int
 main(int argc, char* argv[]) {
     ::testing::InitGoogleTest(&argc, argv);
-    setenv("B10_FROM_SOURCE", TOP_SRCDIR, 1);
+    setenv("B10_FROM_SOURCE", TOP_BUILDDIR, 1);
     isc::log::initLogger();
     return (isc::util::unittests::run_all());
 }
index c88b117d20d3e94d915279b569768efe09248677..912ad4e4d88aca2cc709515ed3d9d4ebde48d41a 100755 (executable)
@@ -16,7 +16,7 @@
 # Checks that the logger will limit the output of messages less severe than
 # the severity/debug setting.
 
-export B10_FROM_SOURCE=@abs_top_srcdir@
+export B10_FROM_SOURCE=@abs_top_builddir@
 
 testname="Severity test"
 echo $testname
index 4f96c0b6d144195e47fc9721be04dbd9bd6dfb49..d47e354b038b2508958f751bf94c91ccbdba113c 100644 (file)
@@ -28,7 +28,7 @@ endif
        $(LIBRARY_PATH_PLACEHOLDER) \
        PYTHONPATH=$(COMMON_PYTHON_PATH):$(abs_top_builddir)/src/lib/python/isc/log:$(abs_top_builddir)/src/lib/log/python/.libs \
        B10_TEST_PLUGIN_DIR=$(abs_top_srcdir)/src/bin/cfgmgr/plugins \
-       B10_FROM_SOURCE=$(abs_top_srcdir) \
+       B10_FROM_SOURCE=$(abs_top_builddir) \
        $(PYCOVERAGE_RUN) $(abs_srcdir)/$$pytest || exit ; \
        done ; \
        for pytest in $(PYTESTS_GEN) ; do \
index a34b2de4447f9e487a4de4acdef9de6cd515881b..e1cdd6b8816e313011e55abc4ebd948f754f6e7e 100644 (file)
@@ -7,7 +7,6 @@ AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_builddir)\"
 # used to bind a UNIX domain socket so we can minimize the risk of exceeding
 # the limit of file name path size.
 AM_CPPFLAGS += -DTEST_DATA_TOPBUILDDIR=\"$(abs_top_builddir)\"
-AM_CPPFLAGS += -DTOP_SRCDIR=\"${abs_top_srcdir}\"
 AM_CXXFLAGS = $(B10_CXXFLAGS)
 
 if USE_STATIC_LINK
index b89be8d68200482a5c9846029bcd5c381f6bdb6f..0be72479965867d4e483f581c796e9ee10f4d2c8 100644 (file)
@@ -20,6 +20,6 @@ int
 main(int argc, char* argv[]) {
     ::testing::InitGoogleTest(&argc, argv);
 
-    setenv("B10_FROM_SOURCE", TOP_SRCDIR, 1);
+    setenv("B10_FROM_SOURCE", TEST_DATA_TOPBUILDDIR, 1);
     return (isc::util::unittests::run_all());
 }