[svn-commits] coreyfarrell: testsuite/asterisk/trunk r4682 - in /asterisk/trunk: ./ lib/pyt...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Feb 10 12:48:43 CST 2014
Author: coreyfarrell
Date: Mon Feb 10 12:48:38 2014
New Revision: 4682
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4682
Log:
Fix run-local errors
* Enable appropriate defaults for run-local setup
* Correct path lookup for astmoddir when checking dependencies
* Fix hardcoded paths in tests/example and tests/dynamic-modules
(closes issue ASTERISK-23244)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3195/
Modified:
asterisk/trunk/lib/python/asterisk/asterisk.py
asterisk/trunk/lib/python/asterisk/test_config.py
asterisk/trunk/run-local
asterisk/trunk/tests/dynamic-modules/run-test
asterisk/trunk/tests/example/run-test
Modified: asterisk/trunk/lib/python/asterisk/asterisk.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/asterisk.py?view=diff&rev=4682&r1=4681&r2=4682
==============================================================================
--- asterisk/trunk/lib/python/asterisk/asterisk.py (original)
+++ asterisk/trunk/lib/python/asterisk/asterisk.py Mon Feb 10 12:48:38 2014
@@ -216,6 +216,7 @@
self.process_protocol = None
self.process = None
self.astetcdir = ""
+ self.original_astmoddir = ""
if base is not None:
self.base = "%s/%s" % (self.base, base)
@@ -259,6 +260,14 @@
if cat.name == "directories":
for (var, val) in cat.options:
self.directories[var] = val
+
+ # self.original_astmoddir is for dependency checking only
+ if "astmoddir" in self.directories:
+ if self.localtest_root:
+ self.original_astmoddir = "%s%s" % (
+ self.localtest_root, self.directories["astmoddir"])
+ else:
+ self.original_astmoddir = self.directories["astmoddir"]
def start(self, deps=None):
"""Start this instance of Asterisk.
Modified: asterisk/trunk/lib/python/asterisk/test_config.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/test_config.py?view=diff&rev=4682&r1=4681&r2=4682
==============================================================================
--- asterisk/trunk/lib/python/asterisk/test_config.py (original)
+++ asterisk/trunk/lib/python/asterisk/test_config.py Mon Feb 10 12:48:38 2014
@@ -199,10 +199,10 @@
def _find_asterisk_module(self, name):
"""Determine if an Asterisk module exists"""
- if "astmoddir" not in Dependency.ast.directories:
- return False
-
- module = "%s/%s.so" % (Dependency.ast.directories["astmoddir"], name)
+ if Dependency.ast.original_astmoddir == "":
+ return False
+
+ module = "%s/%s.so" % (Dependency.ast.original_astmoddir, name)
if os.path.exists(module):
return True
Modified: asterisk/trunk/run-local
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/run-local?view=diff&rev=4682&r1=4681&r2=4682
==============================================================================
--- asterisk/trunk/run-local (original)
+++ asterisk/trunk/run-local Mon Feb 10 12:48:38 2014
@@ -22,7 +22,9 @@
cd ..
# The user may have already run ./configure and make
if [ ! -f config.status ]; then
- ./configure
+ ./configure --enable-dev-mode
+ make menuselect.makeopts
+ menuselect/menuselect --enable DONT_OPTIMIZE --enable TEST_FRAMEWORK
fi
make
make install samples DESTDIR="$HERE/astroot"
Modified: asterisk/trunk/tests/dynamic-modules/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/dynamic-modules/run-test?view=diff&rev=4682&r1=4681&r2=4682
==============================================================================
--- asterisk/trunk/tests/dynamic-modules/run-test (original)
+++ asterisk/trunk/tests/dynamic-modules/run-test Mon Feb 10 12:48:38 2014
@@ -25,7 +25,8 @@
self.create_asterisk()
def check_file(self, module):
- module[1] = (os.path.isfile(self.ast[0].base + "/usr/lib/asterisk/modules/" + module[0]))
+ module[1] = (os.path.isfile("%s%s/%s" % (self.ast[0].base,
+ self.ast[0].directories["astmoddir"], module[0])))
return module[1]
def pre_load_next(self):
Modified: asterisk/trunk/tests/example/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/example/run-test?view=diff&rev=4682&r1=4681&r2=4682
==============================================================================
--- asterisk/trunk/tests/example/run-test (original)
+++ asterisk/trunk/tests/example/run-test Mon Feb 10 12:48:38 2014
@@ -2,7 +2,7 @@
echo "Checking to see if Asterisk is installed ..."
-if [ ! -f /usr/sbin/asterisk ] && [ ! -f /usr/local/sbin/asterisk ] ; then
+if [ ! -f ${AST_TEST_ROOT}/usr/sbin/asterisk ] && [ ! -f /usr/local/sbin/asterisk ] ; then
echo "Asterisk not found!"
exit 1
fi
More information about the svn-commits
mailing list