solenv/gbuild/CppunitTest.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b20d18054ca5c13376bfd723b7e442c2e011c6de
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Tue Jan 7 09:38:14 2025 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Tue Jan 7 11:33:08 2025 +0100

    Move setting of LD_LIBRARY_PATH closer to invocation of cppunittester
    
    At least for a Linux build of mine, `make CppunitTest_vcl_gtk3_a11y` would 
fail
    with something like
    
    > workdir/LinkTarget/Executable/cppunittester X11 error: Can't open display:
    >    Set DISPLAY environment variable, use -display option
    >    or check permissions of your X-Server
    >    (See "man X" resp. "man xhost" for details)
    
    apparently because that test adds an invocation of xvfb-run to ICECREAM_RUN,
    which appeared on the command line after gb_CppunitTest_CPPTESTPRECOMMAND
    (which, on Linux, sets up LD_LIBRARY_PATH to include instdir/program), so 
that
    the execution of xvfb-run picked up libraries from instdir/program instead 
of
    from the system (at least libpixman-1.so.0, it appears), which then 
apparently
    caused things to not work well.
    
    So move the contents of gb_CppunitTest_CPPTESTPRECOMMAND further down on the
    command line (which then requires an invocation of `env`).  (This still 
leaves
    me with a `make CppunitTest_vcl_gtk3_a11y` that fails in a different way 
now,
    but that's something for another day...)
    
    Change-Id: Ic53dd8f87e3fa548a998363f5489819a02b2bf8b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179862
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Tested-by: Jenkins

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 7ff3caec5f31..4aca3b7f2186 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -146,7 +146,6 @@ else
                $(if $(filter allow,$(NON_APPLICATION_FONT_USE)),, \
                        $(if $(filter 
abort,$(NON_APPLICATION_FONT_USE)),SAL_NON_APPLICATION_FONT_USE=abort, \
                        $(if $(filter 
deny,$(NON_APPLICATION_FONT_USE)),SAL_NON_APPLICATION_FONT_USE=deny))) \
-               $(if $(filter 
gdb,$(gb_CppunitTest_GDBTRACE)),,$(gb_CppunitTest_CPPTESTPRECOMMAND)) \
                $(if $(G_SLICE),G_SLICE=$(G_SLICE)) \
                $(if 
$(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \
                $(if $(strip $(PYTHON_URE)),\
@@ -155,6 +154,7 @@ else
                        PYTHONWARNINGS=default) \
                LO_RUNNING_UNIT_TEST=1 \
                $(ICECREAM_RUN) $(gb_CppunitTest_coredumpctl_run) 
$(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_RR) \
+               $(if $(filter gdb,$(gb_CppunitTest_GDBTRACE)),,env 
$(gb_CppunitTest_CPPTESTPRECOMMAND)) \
                        $(gb_CppunitTest_CPPTESTCOMMAND) \
                $(call gb_CppunitTest_get_linktarget_target,$*) \
                $(call gb_CppunitTest__make_args) "-env:CPPUNITTESTTARGET=$@" \

Reply via email to