summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct13
-rwxr-xr-xregress-driver4
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"