[svn-commits] pabelanger: branch pabelanger/localhostBindaddr r962 - in /asterisk/team/pabe...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Nov 25 19:45:36 CST 2010
Author: pabelanger
Date: Thu Nov 25 19:45:29 2010
New Revision: 962
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=962
Log:
Update a few more tests.
Added:
asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor_audiohook_inherit/configs/ast1/
asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor_audiohook_inherit/configs/ast1/extensions.conf
- copied unchanged from r961, asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor_audiohook_inherit/configs/extensions.conf
asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor_audiohook_inherit/configs/ast1/features.conf
- copied unchanged from r961, asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor_audiohook_inherit/configs/features.conf
asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/ast1/
asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/ast1/extensions.conf
- copied unchanged from r961, asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/extensions.conf
asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/ast1/features.conf
- copied unchanged from r961, asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/features.conf
asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/ast1/iax.conf
- copied unchanged from r961, asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/iax.conf
asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/ast2/
asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/ast2/extensions.conf
- copied unchanged from r961, asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs2/extensions.conf
asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/ast2/iax.conf
- copied unchanged from r961, asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs2/iax.conf
asterisk/team/pabelanger/localhostBindaddr/tests/pbx/call-files/configs/ast1/
asterisk/team/pabelanger/localhostBindaddr/tests/pbx/call-files/configs/ast1/extensions.conf
- copied unchanged from r961, asterisk/team/pabelanger/localhostBindaddr/tests/pbx/call-files/configs/extensions.conf
Removed:
asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor_audiohook_inherit/configs/extensions.conf
asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor_audiohook_inherit/configs/features.conf
asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/extensions.conf
asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/features.conf
asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs/iax.conf
asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/configs2/
asterisk/team/pabelanger/localhostBindaddr/tests/pbx/call-files/configs/extensions.conf
Modified:
asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor_audiohook_inherit/run-test
asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/run-test
asterisk/team/pabelanger/localhostBindaddr/tests/pbx/call-files/run-test
Modified: asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor_audiohook_inherit/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor_audiohook_inherit/run-test?view=diff&rev=962&r1=961&r2=962
==============================================================================
--- asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor_audiohook_inherit/run-test (original)
+++ asterisk/team/pabelanger/localhostBindaddr/tests/mixmonitor_audiohook_inherit/run-test Thu Nov 25 19:45:29 2010
@@ -17,6 +17,9 @@
from asterisk.asterisk import Asterisk
from asterisk.version import AsteriskVersion
+workingdir = "/tmp/asterisk-testsuite/mixmonitor_audiohook_inherit"
+testdir = "tests/mixmonitor_audiohook_inherit"
+
class MixMonitorTest:
def __init__(self, argv):
self.passed = False
@@ -35,10 +38,10 @@
reactor.callWhenRunning(self.run)
print self.ast_version
- self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/mixmonitor_audiohook_inherit")
- self.audiofile1 = os.path.join(os.getcwd(), "tests/mixmonitor_audiohook_inherit/testaudio1")
- self.asterisk.install_configs("tests/mixmonitor_audiohook_inherit/configs")
- self.talkingaudio = os.path.join(os.getcwd(), "tests/mixmonitor_audiohook_inherit/sounds/talking")
+ self.ast1 = Asterisk(base="workingdir")
+ self.ast1.install_configs("%s/configs/ast1" % (testdir))
+ self.audiofile1 = os.path.join(os.getcwd(), "%s/testaudio1" % (testdir))
+ self.talkingaudio = os.path.join(os.getcwd(), "%s/sounds/talking" % (testdir))
def read_result(self):
self.log_last_step("Reading result file from MixMonitor")
@@ -63,21 +66,21 @@
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 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 TALK_AUDIO " + self.talkingaudio)
+ self.ast1.cli_exec("core set global TESTAUDIO1 " + self.audiofile1)
+ 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 TALK_AUDIO " + self.talkingaudio)
+ self.ast1.cli_exec("dialplan set global TESTAUDIO1 " + self.audiofile1)
+ 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
Modified: asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/run-test?view=diff&rev=962&r1=961&r2=962
==============================================================================
--- asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/run-test (original)
+++ asterisk/team/pabelanger/localhostBindaddr/tests/one-step-parking/run-test Thu Nov 25 19:45:29 2010
@@ -19,6 +19,8 @@
from asterisk.asterisk import Asterisk
from asterisk.version import AsteriskVersion
+workingdir = "/tmp/asterisk-testsuite/one-step-parking"
+testdir = "tests/one-step-parking"
class OneStepParkingTest:
def __init__(self, argv):
@@ -32,7 +34,7 @@
# get version info
parser = OptionParser()
parser.add_option("-v", "--version", dest="ast_version",
- help="Asterisk version string")
+ help="Asterisk version string")
(options, args) = parser.parse_args(argv)
self.ast_version = AsteriskVersion(options.ast_version)
@@ -40,26 +42,23 @@
self.agi_dial_a = fastagi.FastAGIFactory(self.get_result_dial_a)
self.agi_b = fastagi.FastAGIFactory(self.get_result_b)
reactor.listenTCP(4600, self.agi_dial_a,
- self.timeout, '127.0.0.1') # retrieve userA (Dial 701)
+ self.timeout, '127.0.0.1') # retrieve userA (Dial 701)
reactor.listenTCP(4574, self.agi_b,
- self.timeout, '127.0.0.1') # success
+ self.timeout, '127.0.0.1') # success
reactor.callWhenRunning(self.run)
- print self.ast_version
- self.asterisk1 = Asterisk(
- base="/tmp/asterisk-testsuite/one-step-parking")
- self.asterisk1.install_configs("tests/one-step-parking/configs")
+ self.ast1 = Asterisk(base=workingdir)
+ self.ast1.install_configs("%s/configs/ast1" % (testdir))
- self.asterisk2 = Asterisk(
- base="/tmp/asterisk-testsuite/one-step-parking")
- self.asterisk2.install_configs("tests/one-step-parking/configs2")
+ self.ast2 = Asterisk(base=workingdir)
+ self.ast2.install_configs("%s/configs/ast2" % (testdir))
# This gets invoked by the dialplan when userA gets parked (701)
# and userB is trying to retrieve userA by dialing 701
def get_result_dial_a(self, agi):
self.log_last_step("Dial userA (701)")
- self.asterisk2.cli_originate(
+ self.ast2.cli_originate(
"IAX2/userA at 127.0.0.1:4570/701 extension retrieve_A at parking")
return agi.finish()
@@ -78,12 +77,12 @@
self.log_last_step("Reading results")
# get lock output in case of deadlock before tearing down.
- self.asterisk1.cli_exec("core show locks")
- self.asterisk2.cli_exec("core show locks")
+ self.ast1.cli_exec("core show locks")
+ self.ast2.cli_exec("core show locks")
# if channels are still up for some reason, we want to know that
- self.asterisk1.cli_exec("core show channels")
- self.asterisk2.cli_exec("core show channels")
+ self.ast1.cli_exec("core show channels")
+ self.ast2.cli_exec("core show channels")
self.stop_asterisk()
@@ -104,17 +103,17 @@
# 4. B calls 701 and retrieves A
def launch_test(self):
self.log_last_step("Originating call to begin test")
- self.asterisk1.cli_originate(
+ self.ast1.cli_originate(
"IAX2/userA at 127.0.0.1:4571/b_exten extension a_dials at parking")
def start_asterisk(self):
self.log_last_step("Starting Asterisk")
- self.asterisk1.start()
- self.asterisk2.start()
+ self.ast1.start()
+ self.ast2.start()
def stop_asterisk(self):
- self.asterisk1.stop()
- self.asterisk2.stop()
+ self.ast1.stop()
+ self.ast2.stop()
def log_last_step(self, step):
print step
Modified: asterisk/team/pabelanger/localhostBindaddr/tests/pbx/call-files/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/localhostBindaddr/tests/pbx/call-files/run-test?view=diff&rev=962&r1=961&r2=962
==============================================================================
--- asterisk/team/pabelanger/localhostBindaddr/tests/pbx/call-files/run-test (original)
+++ asterisk/team/pabelanger/localhostBindaddr/tests/pbx/call-files/run-test Thu Nov 25 19:45:29 2010
@@ -19,8 +19,8 @@
from asterisk.asterisk import Asterisk
from asterisk.version import AsteriskVersion
-WORKINGDIR = "/tmp/asterisk-testsuite/call-files"
-TESTDIR = "tests/pbx/call-files"
+workingdir = "/tmp/asterisk-testsuite/call-files"
+testdir = "tests/pbx/call-files"
class CallFilesTest:
def __init__(self, argv):
@@ -38,8 +38,8 @@
(options, args) = parser.parse_args(argv)
self.ast_version = AsteriskVersion(options.ast_version)
- self.asterisk1 = Asterisk(base=WORKINGDIR)
- self.asterisk1.install_configs("%s/configs" % (TESTDIR))
+ self.ast1 = Asterisk(base=workingdir)
+ self.ast1.install_configs("%s/configs/ast1" % (testdir))
self.agi_factory1 = fastagi.FastAGIFactory(self.get_result1)
self.agi_factory2 = fastagi.FastAGIFactory(self.get_result2)
@@ -65,22 +65,22 @@
def start_asterisk(self):
print "Starting Asterisk"
- self.asterisk1.start()
+ self.ast1.start()
def stop_asterisk(self):
- self.asterisk1.stop()
+ self.ast1.stop()
def launch_test(self):
for i in [ "", "2" ]:
print "Moving the sample%s.call file to the spool dir..." % (i)
copy("%s/sample%s.call" % (TESTDIR, i),
- "%s/etc/sample%s.call" % (self.asterisk1.base, i))
+ "%s/etc/sample%s.call" % (self.ast1.base, i))
- move("%s/etc/sample%s.call" % (self.asterisk1.base, i),
+ move("%s/etc/sample%s.call" % (self.ast1.base, i),
"%s%s/outgoing/" %
- (self.asterisk1.base,
- self.asterisk1.directories["astspooldir"]))
+ (self.ast1.base,
+ self.ast1.directories["astspooldir"]))
def run(self):
self.start_asterisk()
More information about the svn-commits
mailing list