solenv/gbuild/CppunitTest.mk |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 0a0a0c718c825d1e3d7a3a377d3f0a5c2e2e3d18
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Fri Dec 9 20:23:10 2016 +0100

    Fix removal of the temporary dyldpathfile
    
    Change-Id: I2a4efc9ade69ab53da81c72528e18ecb99e99757

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 9d60a02..4e9c7a0 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -32,9 +32,9 @@ ifneq ($(strip $(CPPUNITTRACE)),)
 ifneq ($(filter gdb,$(CPPUNITTRACE)),)
 gb_CppunitTest_GDBTRACE := $(subst gdb,gdb -ex "set environment $(subst =, 
,$(gb_CppunitTest_CPPTESTPRECOMMAND))",$(CPPUNITTRACE))
 else ifneq ($(filter lldb,$(CPPUNITTRACE)),)
-dyldpathfile=$(call var2file,$(shell $(gb_MKTEMP)),500,settings set 
target.env-vars $(gb_CppunitTest_CPPTESTPRECOMMAND))
-gb_CppunitTest_GDBTRACE := $(subst lldb,lldb -s 
$(dyldpathfile),$(CPPUNITTRACE))
-gb_CppunitTest_POSTGDBTRACE := ; rm -f $(dyldpathfile)
+gb_CppunitTest_PREGDBTRACE := lo_dyldpathfile=$(call var2file,$(shell 
$(gb_MKTEMP)),500,settings set target.env-vars 
$(gb_CppunitTest_CPPTESTPRECOMMAND))
+gb_CppunitTest_GDBTRACE := $(subst lldb,lldb -s 
$$lo_dyldpathfile,$(CPPUNITTRACE))
+gb_CppunitTest_POSTGDBTRACE := rm $$lo_dyldpathfile
 endif
 gb_CppunitTest__interactive := $(true)
 endif
@@ -116,7 +116,8 @@ $(call gb_CppunitTest_get_target,%) :| 
$(gb_CppunitTest_RUNTIMEDEPS)
                        $(if $(value gb_CppunitTest_postprocess), \
                                rm -fr $@.core && mkdir $@.core && cd $@.core 
&&)) \
                ( \
-               $(if $(gb_CppunitTest_localized),$(OPEN_PAREN)for l in 
$(WITH_LANG_LIST) ; do LO_TEST_LOCALE="$$l" ) \
+               $(if $(gb_CppunitTest_localized),for l in $(WITH_LANG_LIST) ; 
do LO_TEST_LOCALE="$$l" ) \
+               $(if 
$(gb_CppunitTest_PREGDBTRACE),$(gb_CppunitTest_PREGDBTRACE) &&) \
                $(if $(filter 
gdb,$(CPPUNITTRACE)),,$(gb_CppunitTest_CPPTESTPRECOMMAND)) \
                $(if $(G_SLICE),G_SLICE=$(G_SLICE)) \
                $(if 
$(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \
@@ -127,13 +128,16 @@ $(call gb_CppunitTest_get_target,%) :| 
$(gb_CppunitTest_RUNTIMEDEPS)
                $(ICECREAM_RUN) $(gb_CppunitTest_GDBTRACE) 
$(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_CPPTESTCOMMAND) \
                $(call gb_LinkTarget_get_target,$(call 
gb_CppunitTest_get_linktarget,$*)) \
                $(call gb_CppunitTest__make_args) "-env:CPPUNITTESTTARGET=$@" \
-               $(if $(gb_CppunitTest_localized),|| exit $$?; 
done$(CLOSE_PAREN)) \
+               $(if $(gb_CppunitTest_POSTGDBTRACE), \
+                       ; RET=$$? && $(gb_CppunitTest_POSTGDBTRACE) && (exit 
$$RET)) \
+               $(if $(gb_CppunitTest_localized),|| exit $$?; done) \
+               ) \
                $(if $(gb_CppunitTest__interactive),, \
                        > $@.log 2>&1 \
                        || ($(if $(value gb_CppunitTest_postprocess), \
                                        RET=$$?; \
                                        $(call 
gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),$@.core,$$RET) >> 
$@.log 2>&1;) \
-                               cat $@.log; $(gb_CppunitTest_UNITTESTFAILED) 
Cppunit $*))))
+                               cat $@.log; $(gb_CppunitTest_UNITTESTFAILED) 
Cppunit $*)))
 
 define gb_CppunitTest_CppunitTest
 $(call gb_CppunitTest__CppunitTest_impl,$(1),$(call 
gb_CppunitTest_get_linktarget,$(1)))
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to