solenv/gbuild/CppunitTest.mk |    9 +--------
 solenv/gbuild/JunitTest.mk   |    2 +-
 solenv/gbuild/PythonTest.mk  |    1 +
 solenv/gbuild/UITest.mk      |    1 +
 solenv/gbuild/gbuild.mk      |    8 ++++++++
 5 files changed, 12 insertions(+), 9 deletions(-)

New commits:
commit 39b81921d7ecf6b7b4c61f2564eded7cfce5bd0b
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Nov 22 08:51:09 2018 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Thu Nov 22 13:03:57 2018 +0100

    Pass some env vars into all kinds of tests
    
    ...not only CppunitTests, as had been changed with
    d5ed903618f200456feed9b410b7bd1ed8daeb62 "Set CppunitTest-related env vars 
only
    during CppunitTest".  Despite those env vars having been deceptively set up
    in solenv/gbuild/CppunitTest.mk, at least some of them may also be useful 
during
    other tests, and may actually have been relied upon by other tests in the 
past.
    
    Change-Id: I854dfb1786bb5e9e2de5fd77cb6323299320b544
    Reviewed-on: https://gerrit.libreoffice.org/63784
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 21cff341d57d..283ea290d04a 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -19,13 +19,6 @@
 
 # CppunitTest class
 
-# Cap the number of threads unittests use.
-gb_CppunitTest_ENV_VARS := MAX_CONCURRENCY=4
-# Disable searching for certificates by default
-gb_CppunitTest_ENV_VARS += MOZILLA_CERTIFICATE_FOLDER=0
-# Avoid hanging if the cups daemon requests a password.
-gb_CppunitTest_ENV_VARS += SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION=1
-
 gb_CppunitTest_UNITTESTFAILED ?= 
$(GBUILDDIR)/platform/unittest-failed-default.sh
 gb_CppunitTest_PYTHONDEPS ?= $(call gb_Library_get_target,pyuno_wrapper) $(if 
$(SYSTEM_PYTHON),,$(call gb_Package_get_target,python3))
 
@@ -129,7 +122,7 @@ else
                ( \
                $(if $(gb_CppunitTest_localized),for l in $(WITH_LANG_LIST) ; 
do LO_TEST_LOCALE="$$l" ) \
                $(if 
$(gb_CppunitTest_PREGDBTRACE),$(gb_CppunitTest_PREGDBTRACE) &&) \
-               $(gb_CppunitTest_ENV_VARS) \
+               $(gb_TEST_ENV_VARS) \
                $(if $(gb_CppunitTest__vcl_no_svp),,SAL_USE_VCLPLUGIN=$(or 
$(SAL_USE_VCLPLUGIN),svp)) \
                $(EXTRA_ENV_VARS) \
                $(if $(filter 
gdb,$(gb_CppunitTest_GDBTRACE)),,$(gb_CppunitTest_CPPTESTPRECOMMAND)) \
diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
index 2e0fe97fa802..7af730567d62 100644
--- a/solenv/gbuild/JunitTest.mk
+++ b/solenv/gbuild/JunitTest.mk
@@ -40,7 +40,7 @@ else
         rm -rf $(call gb_JunitTest_get_userdir,$*) && \
                mkdir -p $(call gb_JunitTest_get_userdir,$*)/user && \
                cp $(SRCDIR)/qadevOOo/qa/registrymodifications.xcu $(call 
gb_JunitTest_get_userdir,$*)/user/ && \
-        ($(gb_JunitTest_JAVACOMMAND) \
+        ($(gb_TEST_ENV_VARS) $(gb_JunitTest_JAVACOMMAND) \
             -classpath "$(T_CP)" \
             $(DEFS) \
             org.junit.runner.JUnitCore \
diff --git a/solenv/gbuild/PythonTest.mk b/solenv/gbuild/PythonTest.mk
index 329009c4b1d2..e2e52d9746b7 100644
--- a/solenv/gbuild/PythonTest.mk
+++ b/solenv/gbuild/PythonTest.mk
@@ -55,6 +55,7 @@ else
                UserInstallation=$(call gb_Helper_make_url,$(dir $(call 
gb_PythonTest_get_target,$*))user) \
                TestUserDir="$(call gb_Helper_make_url,$(dir $(call 
gb_PythonTest_get_target,$*)))" \
                PYTHONDONTWRITEBYTECODE=1 \
+               $(gb_TEST_ENV_VARS) \
                $(if $(filter-out MACOSX WNT,$(OS_FOR_BUILD)),$(if 
$(DISABLE_GUI),, \
                        SAL_USE_VCLPLUGIN=svp \
                )) \
diff --git a/solenv/gbuild/UITest.mk b/solenv/gbuild/UITest.mk
index 4affafe2eb29..d3946626ac69 100644
--- a/solenv/gbuild/UITest.mk
+++ b/solenv/gbuild/UITest.mk
@@ -69,6 +69,7 @@ else
                PYTHONPATH="$(PYPATH)" \
                TestUserDir="$(call gb_Helper_make_url,$(dir $(call 
gb_UITest_get_target,$*)))" \
                PYTHONDONTWRITEBYTECODE=0 \
+               $(gb_TEST_ENV_VARS) \
                $(if $(filter-out MACOSX WNT,$(OS_FOR_BUILD)),$(if 
$(DISABLE_GUI),, \
                        SAL_USE_VCLPLUGIN=svp \
                )) \
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 0aee4f84776d..8760c4d69ca6 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -241,6 +241,14 @@ gb_GLOBALDEFS += \
 
 gb_GLOBALDEFS := $(sort $(gb_GLOBALDEFS))
 
+# Common environment variables passed into all gb_*Test classes:
+# * Cap the number of threads unittests use:
+gb_TEST_ENV_VARS := MAX_CONCURRENCY=4
+# * Disable searching for certificates by default:
+gb_TEST_ENV_VARS += MOZILLA_CERTIFICATE_FOLDER=0
+# Avoid hanging if the cups daemon requests a password:
+gb_TEST_ENV_VARS += SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION=1
+
 # This is used to detect whether LibreOffice is being built (as opposed to 
building
 # 3rd-party code). Used for tag deprecation for API we want to
 # ensure is not used at all externally while we clean
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to