Parcourir la source

[1704] Update test environments to set B10_FROM_SOURCE

Mukund Sivaraman il y a 13 ans
Parent
commit
9427bd4115

+ 1 - 0
src/lib/log/tests/Makefile.am

@@ -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  =

+ 2 - 0
src/lib/log/tests/console_test.sh.in

@@ -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
 

+ 2 - 0
src/lib/log/tests/destination_test.sh.in

@@ -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
 

+ 2 - 0
src/lib/log/tests/init_logger_test.sh.in

@@ -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
 

+ 2 - 0
src/lib/log/tests/local_file_test.sh.in

@@ -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
 

+ 2 - 0
src/lib/log/tests/run_initializer_unittests.cc

@@ -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());
 }

+ 2 - 0
src/lib/log/tests/run_unittests.cc

@@ -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());
 }

+ 2 - 0
src/lib/log/tests/severity_test.sh.in

@@ -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
 

+ 1 - 0
src/lib/python/isc/log/tests/Makefile.am

@@ -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 \