[Asterisk-code-review] testsuite: Remove some external dependencies for run-local (testsuite[master])

George Joseph asteriskteam at digium.com
Mon Apr 20 16:00:36 CDT 2015


George Joseph has uploaded a new change for review.

  https://gerrit.asterisk.org/167

Change subject: testsuite: Remove some external dependencies for run-local
......................................................................

testsuite: Remove some external dependencies for run-local

run-local wasn't accounting for 64 bit systems where libraries are in
lib64 instead of lib.  Now it searches for libasteriskssl.so in ./astroot
and prepends it's path to LD_LIBRARY_PATH.

buildoptions.py now includins ./astroot/usr/include/asterisk when
looking for buildopts.h.

When run with run-local the testsuite should now not look for any
asterisk components outside of ./astroot.

ASTERISK-24984 #close

Change-Id: Idf59b8b6de7524913ab4e3c29006e91a29d60e4e
---
M lib/python/asterisk/buildoptions.py
M run-local
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/67/167/1

diff --git a/lib/python/asterisk/buildoptions.py b/lib/python/asterisk/buildoptions.py
index 9c2c46a..3b0b4b9 100644
--- a/lib/python/asterisk/buildoptions.py
+++ b/lib/python/asterisk/buildoptions.py
@@ -28,6 +28,7 @@
         self._flags = {}
 
         buildopts_hdr_paths = [
+            "./astroot/usr/include/asterisk/buildopts.h",
             "../include/asterisk/buildopts.h",
             "/usr/include/asterisk/buildopts.h",
             "/usr/local/include/asterisk/buildopts.h"
diff --git a/run-local b/run-local
index 64d624d..7a7d0bb 100755
--- a/run-local
+++ b/run-local
@@ -60,7 +60,8 @@
 	export PATH="$HERE/astroot/usr/local/bin:$HERE/astroot/usr/sbin:$PATH"
         # Preprend ':' if LD_LIBRARY_PATH is not empty:
 	LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
-	export LD_LIBRARY_PATH="$HERE/astroot/usr/lib${LD_LIBRARY_PATH}"
+	# Libraries could be in lib or lib64 so search for libasteriskssl.so
+	export LD_LIBRARY_PATH="$HERE/$(dirname `find ./astroot -name libasteriskssl.so`)${LD_LIBRARY_PATH}"
 	set +e
 	./runtests.py "$@"
 	status=$?

-- 
To view, visit https://gerrit.asterisk.org/167
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf59b8b6de7524913ab4e3c29006e91a29d60e4e
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>



More information about the asterisk-code-review mailing list