From 20e08248a6466c174ebef11b08bcd31668f8de98 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 30 Nov 2013 12:05:44 -0500 Subject: Belt-and-suspenders setting of LD_LIBRARY_PATH for regression testing. --- SConstruct | 13 ++++++++----- regress-driver | 4 ++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/SConstruct b/SConstruct index 7ab4d7e3..a4e6b10f 100644 --- a/SConstruct +++ b/SConstruct @@ -481,11 +481,14 @@ else: env.Prepend(LIBPATH=[os.path.realpath(os.curdir)]) if env["shared"] and env["chrpath"]: if WhereIs('chrpath'): - # Tell generated binaries to look in the current directory for - # shared libraries so we can run regression tests without - # hassle. Should be handled sanely by scons on all systems. Not - # good to use '.' or a relative path here; it's a security risk. - # At install time we use chrpath to edit this out of RPATH. + # Tell generated binaries to look in the current directory + # for shared libraries so we can run ad-hoc tests without + # hassle (the regression tests *don't* need this as + # they're run in a controlled environment where we can set + # LD_LIBRARY_PATH). Should be handled sanely by scons on + # all systems. Not good to use '.' or a relative path + # here; it's a security risk. At install time we use + # chrpath to edit this out of RPATH. env.Prepend(RPATH=[os.path.realpath(os.curdir)]) else: print "chrpath is not available; please build with chrpath=no." diff --git a/regress-driver b/regress-driver index af4feb28..453b932a 100755 --- a/regress-driver +++ b/regress-driver @@ -15,6 +15,10 @@ else GPSD_HOME=`dirname $0` fi +# Avoid dynamic-linking failures if we don't happen to have the GPSD +# libraries installed in system space yet. +export LD_LIBRARY_PATH=$GPSD_HOME + # Arrange to call a gpsfake in the source directory without fuss. if [ -z ${PYTHON} ]; then PYTHON="python" -- cgit v1.2.1