populate library path to gbuildtojson in tests

the test environment clears LD_LIBRARY_PATH as it seems to cause trouble for
make in ASAN. "make gbuildtoide" only runs the gbuildtojson exe, so make sure
it gets the LD_LIBRARY_PATH that was filtered out from the make that starts it.

Change-Id: I69ee0024232092aebcd1e8e11b002d6f7eb55c84
Reviewed-on: https://gerrit.libreoffice.org/30433
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
This commit is contained in:
Bjoern Michaelsen 2016-10-31 09:54:07 +01:00 committed by Björn Michaelsen
parent 77837fb21c
commit 735e5bb855
2 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ foo:
define gb_LinkTarget__command
mkdir -p $(WORKDIR)/GbuildToIde/$(dir $(2))
mkdir -p $(WORKDIR)/LinkTarget/$(dir $(2))
$(if $(GBUILDTOJSON_LD_LIBRARY_PATH),LD_LIBRARY_PATH=$(GBUILDTOJSON_LD_LIBRARY_PATH)) \
$(call gb_Executable_get_command,gbuildtojson) \
--linktarget=$(call var2file,$(shell $(gb_MKTEMP)),100,$(2)) \
--ilibtarget=$(call var2file,$(shell $(gb_MKTEMP)),100,$(ILIBTARGET)) \

View File

@ -28,6 +28,7 @@ def getgbuildtesttools(testcase):
makeenvvars = ['MAKEOVERRIDES', 'MAKEFLAGS', 'MAKE_TERMERR', 'MAKE_TERMOUT', 'MAKELEVEL', 'MFLAGS']
def clearmakevars():
if 'LD_LIBRARY_PATH' in os.environ:
os.environ['GBUILDTOJSON_LD_LIBRARY_PATH'] = os.environ['LD_LIBRARY_PATH']
del(os.environ['LD_LIBRARY_PATH']) # built with ASAN; prevent that
for makeenvvar in makeenvvars:
if makeenvvar in os.environ: