[asterisk-commits] pabelanger: branch pabelanger/non-root r666 - in /asterisk/team/pabelanger/no...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jul 30 14:14:20 CDT 2010
Author: pabelanger
Date: Fri Jul 30 14:14:16 2010
New Revision: 666
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=666
Log:
Remove addons. Ugly hack to get unprivileged tests working. It
currently defaults to /tmp/x. TODO: Make this more flexible, and
pretty.
Removed:
asterisk/team/pabelanger/non-root/addons/
Modified:
asterisk/team/pabelanger/non-root/lib/python/asterisk/asterisk.py
asterisk/team/pabelanger/non-root/runtests.py
asterisk/team/pabelanger/non-root/tests/cdr/app_dial_G_flag/run-test
asterisk/team/pabelanger/non-root/tests/cdr/app_queue/run-test
asterisk/team/pabelanger/non-root/tests/cdr/blind-transfer-accountcode/run-test
asterisk/team/pabelanger/non-root/tests/cdr/originate-cdr-disposition/run-test
asterisk/team/pabelanger/non-root/tests/example/run-test
asterisk/team/pabelanger/non-root/tests/func_srv/run-test
asterisk/team/pabelanger/non-root/tests/manager/action-events-response/run-test
asterisk/team/pabelanger/non-root/tests/manager/response-time/run-test
asterisk/team/pabelanger/non-root/tests/queues/macro_gosub_test/run-test
asterisk/team/pabelanger/non-root/tests/queues/position_priority_maxlen/run-test
asterisk/team/pabelanger/non-root/tests/queues/queue_baseline/run-test
asterisk/team/pabelanger/non-root/tests/queues/ringinuse_and_pause/run-test
asterisk/team/pabelanger/non-root/tests/queues/wrapup_time/run-test
asterisk/team/pabelanger/non-root/tests/rfc2833_dtmf_detect/run-test
asterisk/team/pabelanger/non-root/tests/sip_channel_params/run-test
asterisk/team/pabelanger/non-root/tests/sip_outbound_address/run-test
Modified: asterisk/team/pabelanger/non-root/lib/python/asterisk/asterisk.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/lib/python/asterisk/asterisk.py?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/lib/python/asterisk/asterisk.py (original)
+++ asterisk/team/pabelanger/non-root/lib/python/asterisk/asterisk.py Fri Jul 30 14:14:16 2010
@@ -59,10 +59,10 @@
self.directories = {}
self.ast_version = AsteriskVersion()
- self.astetcdir = "/etc/asterisk"
+ self.astetcdir = "/tmp/x/etc/asterisk"
# Find the system installed asterisk.conf
ast_confs = [
- "/etc/asterisk/asterisk.conf",
+ "/tmp/x/etc/asterisk/asterisk.conf",
"/usr/local/etc/asterisk/asterisk.conf"
]
ast_conf = None
@@ -107,7 +107,7 @@
asterisk.start()
"""
cmd = [
- "asterisk",
+ "/tmp/x/usr/sbin/asterisk",
"-f", "-g", "-q", "-m", "-n",
"-C", "%s" % os.path.join(self.astetcdir, "asterisk.conf")
]
@@ -219,7 +219,7 @@
asterisk.cli_exec("core set verbose 10")
"""
cmd = [
- "asterisk",
+ "/tmp/x/usr/sbin/asterisk",
"-C", "%s" % os.path.join(self.astetcdir, "asterisk.conf"),
"-rx", "%s" % cli_cmd
]
@@ -286,20 +286,23 @@
if ast_dir_name in dirs_only:
return
blacklist = [ "astdb" ]
- for dirname, dirnames, filenames in os.walk(ast_dir_path):
+ for dirname, dirnames, filenames in os.walk("/tmp/x%s" % ast_dir_path):
for filename in filenames:
+ ast_dir_path = ""
target = "%s/%s" % (self.base, os.path.join(ast_dir_path,
- dirname, filename))
+ dirname.lstrip("/tmp/x"), filename))
if os.path.exists(target) or filename in blacklist:
continue
- os.symlink(os.path.join(ast_dir_path, dirname, filename),
+ os.symlink(os.path.join(dirname, filename),
target)
def __makedirs(self, ast_dir_path):
target_dir = "%s%s" % (self.base, ast_dir_path)
if not os.path.exists(target_dir):
os.makedirs(target_dir)
- for dirname, dirnames, filenames in os.walk(ast_dir_path):
+ for dirname, dirnames, filenames in os.walk("/tmp/x%s" % ast_dir_path):
for d in dirnames:
+ target_dir = "/"
+ dirname = dirname.lstrip("/tmp/x")
self.__makedirs(os.path.join(target_dir, dirname, d))
Modified: asterisk/team/pabelanger/non-root/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/runtests.py?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/runtests.py (original)
+++ asterisk/team/pabelanger/non-root/runtests.py Fri Jul 30 14:14:16 2010
@@ -20,7 +20,6 @@
from asterisk.version import AsteriskVersion
from asterisk.asterisk import Asterisk
-
TESTS_CONFIG = "tests/tests.yaml"
TEST_RESULTS = "asterisk-test-suite-report.xml"
@@ -295,15 +294,15 @@
print "Making sure Asterisk isn't running ..."
os.system("killall -9 asterisk > /dev/null 2>&1")
# XXX TODO Hard coded path, gross.
- os.system("rm -f /var/run/asterisk/asterisk.ctl")
- os.system("rm -f /var/run/asterisk/asterisk.pid")
+ os.system("rm -f /tmp/x/var/run/asterisk/asterisk.ctl")
+ os.system("rm -f /tmp/x/var/run/asterisk/asterisk.pid")
os.chdir("..")
print "Uninstalling Asterisk ... "
- os.system("make uninstall-all > /dev/null 2>&1")
+ os.system("make DESTDIR=/tmp/x uninstall-all > /dev/null 2>&1")
print "Installing Asterisk ... "
- os.system("make install > /dev/null 2>&1")
+ os.system("make DESTDIR=/tmp/x install > /dev/null 2>&1")
print "Installing sample configuration ... "
- os.system("make samples > /dev/null 2>&1")
+ os.system("make DESTDIR=/tmp/x samples > /dev/null 2>&1")
os.chdir(test_suite_dir)
# Run Test
@@ -393,11 +392,6 @@
test_suite.list_tests()
return 0
- if os.geteuid() != 0:
- print "You must run this script as root."
- print BIG_WARNING
- return 1
-
print "Running tests for Asterisk %s ...\n" % str(ast_version)
test_suite.run()
Modified: asterisk/team/pabelanger/non-root/tests/cdr/app_dial_G_flag/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/cdr/app_dial_G_flag/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/cdr/app_dial_G_flag/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/cdr/app_dial_G_flag/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
. lib/sh/lua.sh
-asttest -a / -s `dirname $0` $@
+asttest -a /tmp/x -s `dirname $0` $@
Modified: asterisk/team/pabelanger/non-root/tests/cdr/app_queue/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/cdr/app_queue/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/cdr/app_queue/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/cdr/app_queue/run-test Fri Jul 30 14:14:16 2010
@@ -1,5 +1,4 @@
#!/bin/bash -e
export LUA_PATH=../../lib/lua/?.lua\;\;
export LUA_CPATH=../../lib/lua/?.so\;\;
-asttest -a / -s `dirname $0` $@
-
+asttest -a /tmp/x -s `dirname $0` $@
Modified: asterisk/team/pabelanger/non-root/tests/cdr/blind-transfer-accountcode/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/cdr/blind-transfer-accountcode/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/cdr/blind-transfer-accountcode/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/cdr/blind-transfer-accountcode/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
. lib/sh/lua.sh
-asttest -a / -s `dirname $0` $@
+asttest -a /tmp/x -s `dirname $0` $@
Modified: asterisk/team/pabelanger/non-root/tests/cdr/originate-cdr-disposition/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/cdr/originate-cdr-disposition/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/cdr/originate-cdr-disposition/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/cdr/originate-cdr-disposition/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
. lib/sh/lua.sh
-asttest -a / -s `dirname $0` $@
+asttest -a /tmp/x -s `dirname $0` $@
Modified: asterisk/team/pabelanger/non-root/tests/example/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/example/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/example/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/example/run-test Fri Jul 30 14:14:16 2010
@@ -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 /tmp/x/usr/sbin/asterisk ] ; then
echo "Asterisk not found!"
exit 1
fi
Modified: asterisk/team/pabelanger/non-root/tests/func_srv/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/func_srv/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/func_srv/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/func_srv/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
-asttest -a / -s tests/func_srv
+asttest -a /tmp/x -s tests/func_srv
Modified: asterisk/team/pabelanger/non-root/tests/manager/action-events-response/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/manager/action-events-response/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/manager/action-events-response/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/manager/action-events-response/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
. lib/sh/lua.sh
-asttest -a / -s `dirname $0` $@
+asttest -a /tmp/x -s `dirname $0` $@
Modified: asterisk/team/pabelanger/non-root/tests/manager/response-time/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/manager/response-time/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/manager/response-time/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/manager/response-time/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
. lib/sh/lua.sh
-asttest -a / -s `dirname $0` $@
+asttest -a /tmp/x -s `dirname $0` $@
Modified: asterisk/team/pabelanger/non-root/tests/queues/macro_gosub_test/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/queues/macro_gosub_test/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/queues/macro_gosub_test/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/queues/macro_gosub_test/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
-asttest -a / -s tests/queues/macro_gosub_test
+asttest -a /tmp/x -s tests/queues/macro_gosub_test
Modified: asterisk/team/pabelanger/non-root/tests/queues/position_priority_maxlen/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/queues/position_priority_maxlen/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/queues/position_priority_maxlen/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/queues/position_priority_maxlen/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
-asttest -a / -s tests/queues/position_priority_maxlen
+asttest -a /tmp/x -s tests/queues/position_priority_maxlen
Modified: asterisk/team/pabelanger/non-root/tests/queues/queue_baseline/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/queues/queue_baseline/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/queues/queue_baseline/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/queues/queue_baseline/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
-asttest -a / -s tests/queues/queue_baseline
+asttest -a /tmp/x -s tests/queues/queue_baseline
Modified: asterisk/team/pabelanger/non-root/tests/queues/ringinuse_and_pause/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/queues/ringinuse_and_pause/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/queues/ringinuse_and_pause/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/queues/ringinuse_and_pause/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
-asttest -a / -s tests/queues/ringinuse_and_pause
+asttest -a /tmp/x -s tests/queues/ringinuse_and_pause
Modified: asterisk/team/pabelanger/non-root/tests/queues/wrapup_time/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/queues/wrapup_time/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/queues/wrapup_time/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/queues/wrapup_time/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
-asttest -a / -s tests/queues/wrapup_time
+asttest -a /tmp/x -s tests/queues/wrapup_time
Modified: asterisk/team/pabelanger/non-root/tests/rfc2833_dtmf_detect/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/rfc2833_dtmf_detect/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/rfc2833_dtmf_detect/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/rfc2833_dtmf_detect/run-test Fri Jul 30 14:14:16 2010
@@ -1,4 +1,3 @@
#!/bin/bash -e
-asttest -a / -s tests/rfc2833_dtmf_detect
-
+asttest -a /tmp/x -s tests/rfc2833_dtmf_detect
Modified: asterisk/team/pabelanger/non-root/tests/sip_channel_params/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/sip_channel_params/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/sip_channel_params/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/sip_channel_params/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
-asttest -a / -s tests/sip_channel_params
+asttest -a /tmp/x -s tests/sip_channel_params
Modified: asterisk/team/pabelanger/non-root/tests/sip_outbound_address/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/tests/sip_outbound_address/run-test?view=diff&rev=666&r1=665&r2=666
==============================================================================
--- asterisk/team/pabelanger/non-root/tests/sip_outbound_address/run-test (original)
+++ asterisk/team/pabelanger/non-root/tests/sip_outbound_address/run-test Fri Jul 30 14:14:16 2010
@@ -1,3 +1,3 @@
#!/bin/bash -e
-asttest -a / -s tests/sip_outbound_address
+asttest -a /tmp/x -s tests/sip_outbound_address
More information about the asterisk-commits
mailing list