]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1704] Update test environments to set B10_FROM_SOURCE
authorMukund Sivaraman <muks@isc.org>
Wed, 23 May 2012 08:47:54 +0000 (14:17 +0530)
committerMukund Sivaraman <muks@isc.org>
Wed, 23 May 2012 08:47:54 +0000 (14:17 +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

index 6f3d7686dd8a7686a53fa61f94d9d6b2b23f052d..dd3c08c431db3de1305af63dab4eaeb2aa6ddd54 100644 (file)
@@ -2,6 +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_CXXFLAGS = $(B10_CXXFLAGS)
 AM_LDADD    =
 AM_LDFLAGS  =
index a16dc231871cdf6cf9ab1c1d716887a28b5bdb8c..2b3e6ace0a5cf18cbf8f4550bad6a21eff69efcf 100755 (executable)
@@ -16,6 +16,8 @@
 # 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@
+
 testname="Console output test"
 echo $testname
 
index 1cfb9fb4f6df145952247423e345657a0a437f71..722b9a528dca7c08459b31e77741fc74b94f593d 100755 (executable)
@@ -15,6 +15,8 @@
 
 # Checks that the logger will route messages to the chosen destination.
 
+export B10_FROM_SOURCE=@abs_top_srcdir@
+
 testname="Destination test"
 echo $testname
 
index 795419bf663360f2036483dc735843ae7c776288..5e05531ef6f233f4bd59efac02294459a1da7cfe 100755 (executable)
@@ -16,6 +16,8 @@
 # Checks that the initLogger() call uses for unit tests respects the setting of
 # the environment variables.
 
+export B10_FROM_SOURCE=@abs_top_srcdir@
+
 testname="initLogger test"
 echo $testname
 
index 9b898e6e216c1613636b8d14704842b1aa5ca004..6ee4aec1757f7982760ac5b0675f021565980bfd 100755 (executable)
@@ -16,6 +16,8 @@
 # Checks that a local message file can override the definitions in the message
 # dictionary.
 
+export B10_FROM_SOURCE=@abs_top_srcdir@
+
 testname="Local message file test"
 echo $testname
 
index 54ee120a80a684f15628a352c490c7bb995b86f1..aadfa4922b2c71583102b4c757c7e8df341989fb 100644 (file)
@@ -12,6 +12,7 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <stdlib.h>
 #include <gtest/gtest.h>
 #include <util/unittests/run_all.h>
 
@@ -20,5 +21,6 @@
 int
 main(int argc, char* argv[]) {
     ::testing::InitGoogleTest(&argc, argv);
+    setenv("B10_FROM_SOURCE", TOP_SRCDIR, 1);
     return (isc::util::unittests::run_all());
 }
index 8a9d1e582188aefac8c11ae3d5db7bb43e46049f..1376a9179d99ecef0136607b6640a575a5da94ae 100644 (file)
@@ -12,6 +12,7 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <stdlib.h>
 #include <gtest/gtest.h>
 #include <util/unittests/run_all.h>
 
@@ -20,6 +21,7 @@
 int
 main(int argc, char* argv[]) {
     ::testing::InitGoogleTest(&argc, argv);
+    setenv("B10_FROM_SOURCE", TOP_SRCDIR, 1);
     isc::log::initLogger();
     return (isc::util::unittests::run_all());
 }
index 78d5050734ed4fa4107bbfa1047069157d50b83c..c88b117d20d3e94d915279b569768efe09248677 100755 (executable)
@@ -16,6 +16,8 @@
 # Checks that the logger will limit the output of messages less severe than
 # the severity/debug setting.
 
+export B10_FROM_SOURCE=@abs_top_srcdir@
+
 testname="Severity test"
 echo $testname
 
index 170eee6cb08e577daa2d602099586c27e6801782..4f96c0b6d144195e47fc9721be04dbd9bd6dfb49 100644 (file)
@@ -28,6 +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) \
        $(PYCOVERAGE_RUN) $(abs_srcdir)/$$pytest || exit ; \
        done ; \
        for pytest in $(PYTESTS_GEN) ; do \