[asterisk-commits] pabelanger: branch pabelanger/localhostBindaddr r920 - in /asterisk/team/pabe...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Nov 23 00:57:30 CST 2010
Author: pabelanger
Date: Tue Nov 23 00:57:26 2010
New Revision: 920
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=920
Log:
Final test for the night.
Added:
asterisk/team/pabelanger/localhostBindaddr/tests/func_srv/configs/ast1/
asterisk/team/pabelanger/localhostBindaddr/tests/func_srv/configs/ast1/extensions.conf
- copied unchanged from r915, asterisk/team/pabelanger/localhostBindaddr/tests/func_srv/configs/extensions.conf
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/ast1/
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/ast1/extensions.conf
- copied unchanged from r915, asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/extensions.conf
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/ast1/iax.conf
- copied unchanged from r915, asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/iax.conf
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/ast1/manager.conf
- copied unchanged from r915, asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/manager.conf
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/ast2/
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/ast2/extensions.conf
- copied unchanged from r915, asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs2/extensions.conf
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/ast2/iax.conf
- copied unchanged from r915, asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs2/iax.conf
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/ast2/manager.conf
- copied unchanged from r915, asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs2/manager.conf
asterisk/team/pabelanger/localhostBindaddr/tests/manager/event-monitor/configs/ast1/
asterisk/team/pabelanger/localhostBindaddr/tests/manager/event-monitor/configs/ast1/manager.conf
- copied unchanged from r915, asterisk/team/pabelanger/localhostBindaddr/tests/manager/event-monitor/configs/manager.conf
asterisk/team/pabelanger/localhostBindaddr/tests/manager/login/configs/ast1/
asterisk/team/pabelanger/localhostBindaddr/tests/manager/login/configs/ast1/manager.conf
- copied unchanged from r915, asterisk/team/pabelanger/localhostBindaddr/tests/manager/login/configs/manager.conf
asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor/configs/ast1/
asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor/configs/ast1/extensions.conf
- copied unchanged from r915, asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor/configs/extensions.conf
Removed:
asterisk/team/pabelanger/localhostBindaddr/tests/func_srv/configs/extensions.conf
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/extensions.conf
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/iax.conf
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs/manager.conf
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/configs2/
asterisk/team/pabelanger/localhostBindaddr/tests/manager/event-monitor/configs/manager.conf
asterisk/team/pabelanger/localhostBindaddr/tests/manager/login/configs/manager.conf
asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor/configs/extensions.conf
Modified:
asterisk/team/pabelanger/localhostBindaddr/tests/func_srv/test.lua
asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/run-test
asterisk/team/pabelanger/localhostBindaddr/tests/manager/action-events-response/test.lua
asterisk/team/pabelanger/localhostBindaddr/tests/manager/event-monitor/run-test
asterisk/team/pabelanger/localhostBindaddr/tests/manager/login/run-test
asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor/run-test
Modified: asterisk/team/pabelanger/localhostBindaddr/tests/func_srv/test.lua
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/localhostBindaddr/tests/func_srv/test.lua?view=diff&rev=920&r1=919&r2=920
==============================================================================
--- asterisk/team/pabelanger/localhostBindaddr/tests/func_srv/test.lua (original)
+++ asterisk/team/pabelanger/localhostBindaddr/tests/func_srv/test.lua Tue Nov 23 00:57:26 2010
@@ -73,7 +73,7 @@
end
instance = ast.new()
-instance:load_config("configs/extensions.conf")
+instance:load_config("configs/ast1/extensions.conf")
instance:generate_manager_conf()
instance:spawn()
Modified: asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/run-test?view=diff&rev=920&r1=919&r2=920
==============================================================================
--- asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/run-test (original)
+++ asterisk/team/pabelanger/localhostBindaddr/tests/iax2/basic-call/run-test Tue Nov 23 00:57:26 2010
@@ -20,6 +20,9 @@
from asterisk.version import AsteriskVersion
from asterisk.cdr import AsteriskCSVCDR, AsteriskCSVCDRLine
+workingdir = "/tmp/asterisk-testsuite/iax2/basic-call"
+testdir = "tests/iax2/basic-call"
+
class IAXCallTest:
def __init__(self, argv):
@@ -39,11 +42,11 @@
print "Creating Asterisk instances ..."
- self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/iax2/basic-call")
- self.asterisk.install_configs("tests/iax2/basic-call/configs")
+ self.ast1 = Asterisk(base=workingdir)
+ self.ast1.install_configs("%s/configs/ast1")
- self.asterisk2 = Asterisk(base="/tmp/asterisk-testsuite/iax2/basic-call")
- self.asterisk2.install_configs("tests/iax2/basic-call/configs2")
+ self.ast2 = Asterisk(base=workingdir)
+ self.ast2.install_configs("%s/configs/ast2")
def fastagi_func(self, agi):
sequence = fastagi.InSequence()
@@ -65,13 +68,13 @@
def start_asterisk(self):
print "Starting Asterisk instances ..."
- self.asterisk.start()
- self.asterisk2.start()
+ self.ast1.start()
+ self.ast2.start()
def stop_asterisk(self):
print "Stopping Asterisk instances ..."
- self.asterisk.stop()
- self.asterisk2.stop()
+ self.ast1.stop()
+ self.ast2.stop()
cdr = AsteriskCSVCDR(fn="%s/var/log/asterisk/cdr-csv/Master.csv" %
self.asterisk2.base)
cdr_test = AsteriskCSVCDR(
@@ -86,13 +89,13 @@
self.start_asterisk()
if self.ast_version < AsteriskVersion("1.6.0"):
- self.asterisk.cli_exec("iax2 set debug")
- self.asterisk2.cli_exec("iax2 set debug")
+ self.ast1.cli_exec("iax2 set debug")
+ self.ast2.cli_exec("iax2 set debug")
else:
- self.asterisk.cli_exec("iax2 set debug on")
- self.asterisk2.cli_exec("iax2 set debug on")
+ self.ast1.cli_exec("iax2 set debug on")
+ self.ast2.cli_exec("iax2 set debug on")
- self.asterisk.cli_exec(
+ self.ast1.cli_exec(
"originate IAX2/guest at 127.0.0.1:4569/1000 extension 1000 at iaxtest")
Modified: asterisk/team/pabelanger/localhostBindaddr/tests/manager/action-events-response/test.lua
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/localhostBindaddr/tests/manager/action-events-response/test.lua?view=diff&rev=920&r1=919&r2=920
==============================================================================
--- asterisk/team/pabelanger/localhostBindaddr/tests/manager/action-events-response/test.lua (original)
+++ asterisk/team/pabelanger/localhostBindaddr/tests/manager/action-events-response/test.lua Tue Nov 23 00:57:26 2010
@@ -28,7 +28,7 @@
-- send an Events action
r = check_err("error sending 'Events' action", m(ma, handle_response))
-
+
-- wait for a response
local time_string
if expected_response then
@@ -48,7 +48,7 @@
elseif got_response and not expected_response then
fail("got a response to the 'Events' manager action when we did not expect one:\n" .. got_response:_format())
end
-
+
m(action.logoff())
m:close()
end
Modified: asterisk/team/pabelanger/localhostBindaddr/tests/manager/event-monitor/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/localhostBindaddr/tests/manager/event-monitor/run-test?view=diff&rev=920&r1=919&r2=920
==============================================================================
--- asterisk/team/pabelanger/localhostBindaddr/tests/manager/event-monitor/run-test (original)
+++ asterisk/team/pabelanger/localhostBindaddr/tests/manager/event-monitor/run-test Tue Nov 23 00:57:26 2010
@@ -17,6 +17,9 @@
Please see the documentation in the client module for more information.
"""
+
+workingdir ="/tmp/asterisk-testsuite/manager/event-monitor"
+testdir = "tests/manager/event-monitor"
class Test():
@@ -43,14 +46,14 @@
(options, args) = parser.parse_args(argv)
working_dir = os.path.dirname(argv[0])
- asterisk = Asterisk(base="/tmp/asterisk-testsuite/manager/event-monitor")
- asterisk.install_configs("tests/manager/event-monitor/configs")
+ ast1 = Asterisk(base=workingdir)
+ ast1.install_configs("%s/configs/ast1")
logging.basicConfig()
import client
tester = Test()
- watcher = client.EventWatcher(argv, asterisk, tester, 5)
+ watcher = client.EventWatcher(argv, ast1, tester, 5)
#watcher.log.setLevel(logging.DEBUG)
#manager.log.setLevel(logging.DEBUG)
Modified: asterisk/team/pabelanger/localhostBindaddr/tests/manager/login/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/localhostBindaddr/tests/manager/login/run-test?view=diff&rev=920&r1=919&r2=920
==============================================================================
--- asterisk/team/pabelanger/localhostBindaddr/tests/manager/login/run-test (original)
+++ asterisk/team/pabelanger/localhostBindaddr/tests/manager/login/run-test Tue Nov 23 00:57:26 2010
@@ -18,6 +18,9 @@
sys.path.append("lib/python")
from asterisk.asterisk import Asterisk
+workingdir = "/tmp/asterisk-testsuite/manager/login"
+testdir = "tests/manager/login"
+
class AMILoginTest:
def __init__(self):
@@ -28,8 +31,8 @@
reactor.callWhenRunning(self.run)
print "Creating Asterisk instance ..."
- self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/manager/login")
- self.asterisk.install_configs("tests/manager/login/configs")
+ self.ast1 = Asterisk(base=workingdir)
+ self.ast1.install_configs("%s/configs/ast1" % (testdir))
def stop_reactor(self):
print "Stopping Reactor ..."
@@ -38,10 +41,10 @@
def start_asterisk(self):
self.log_last_step("Starting Asterisk")
- self.asterisk.start()
+ self.ast1.start()
def stop_asterisk(self):
- self.asterisk.stop()
+ self.ast1.stop()
def log_last_step(self, step):
print step
Modified: asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor/run-test?view=diff&rev=920&r1=919&r2=920
==============================================================================
--- asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor/run-test (original)
+++ asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor/run-test Tue Nov 23 00:57:26 2010
@@ -16,6 +16,9 @@
sys.path.append("lib/python")
from asterisk.asterisk import Asterisk
from asterisk.version import AsteriskVersion
+
+workingdir = "/tmp/asterisk-testsuite/mixmonitor"
+testdir = "tests/mixmonitor"
class MixMonitorTest:
def __init__(self, argv):
@@ -38,11 +41,12 @@
reactor.callWhenRunning(self.run)
print self.ast_version
- self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/mixmonitor")
+ self.ast1 = Asterisk(base=workingdir)
+ self.ast1.install_configs("%s/configs/ast1")
self.audiofile1 = os.path.join(os.getcwd(), "tests/mixmonitor/testaudio1")
self.audiofile2 = os.path.join(os.getcwd(), "tests/mixmonitor/testaudio2")
self.audiofile3 = os.path.join(os.getcwd(), "tests/mixmonitor/testaudio3")
- self.asterisk.install_configs("tests/mixmonitor/configs")
+
self.talkingaudio = os.path.join(os.getcwd(), "tests/mixmonitor/sounds/talking")
def read_result(self):
@@ -84,29 +88,29 @@
def launch_test1(self):
self.log_last_step("Placing call to test1 exten")
- self.asterisk.cli_exec("console dial test1 at mixmonitortest")
+ self.ast1.cli_exec("console dial test1 at mixmonitortest")
def launch_test2(self):
self.log_last_step("Placing call to test2 exten")
- self.asterisk.cli_exec("console dial test2 at mixmonitortest")
+ self.ast1.cli_exec("console dial test2 at mixmonitortest")
def start_asterisk(self):
self.log_last_step("Starting Asterisk")
- self.asterisk.start()
+ self.ast1.start()
if self.ast_version < AsteriskVersion("1.6.1"):
- self.asterisk.cli_exec("core set global TESTAUDIO1 " + self.audiofile1)
- self.asterisk.cli_exec("core set global TESTAUDIO2 " + self.audiofile2)
- self.asterisk.cli_exec("core set global TESTAUDIO3 " + self.audiofile3)
- self.asterisk.cli_exec("core set global TALK_AUDIO " + self.talkingaudio)
+ self.ast1.cli_exec("core set global TESTAUDIO1 " + self.audiofile1)
+ self.ast1.cli_exec("core set global TESTAUDIO2 " + self.audiofile2)
+ self.ast1.cli_exec("core set global TESTAUDIO3 " + self.audiofile3)
+ self.ast1.cli_exec("core set global TALK_AUDIO " + self.talkingaudio)
else:
- self.asterisk.cli_exec("dialplan set global TESTAUDIO1 " + self.audiofile1)
- self.asterisk.cli_exec("dialplan set global TESTAUDIO2 " + self.audiofile2)
- self.asterisk.cli_exec("dialplan set global TESTAUDIO3 " + self.audiofile3)
- self.asterisk.cli_exec("dialplan set global TALK_AUDIO " + self.talkingaudio)
+ self.ast1.cli_exec("dialplan set global TESTAUDIO1 " + self.audiofile1)
+ self.ast1.cli_exec("dialplan set global TESTAUDIO2 " + self.audiofile2)
+ self.ast1.cli_exec("dialplan set global TESTAUDIO3 " + self.audiofile3)
+ self.ast1.cli_exec("dialplan set global TALK_AUDIO " + self.talkingaudio)
def stop_asterisk(self):
- self.asterisk.stop()
+ self.ast1.stop()
def log_last_step(self, step):
print step
More information about the asterisk-commits
mailing list