[asterisk-commits] pabelanger: branch pabelanger/localhostBindaddr r918 - in /asterisk/team/pabe...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Nov 22 22:02:59 CST 2010
Author: pabelanger
Date: Mon Nov 22 22:02:56 2010
New Revision: 918
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=918
Log:
Update another test
Added:
asterisk/team/pabelanger/localhostBindaddr/tests/directed_pickup/configs/ast1/
asterisk/team/pabelanger/localhostBindaddr/tests/directed_pickup/configs/ast1/extensions.conf
- copied unchanged from r915, asterisk/team/pabelanger/localhostBindaddr/tests/directed_pickup/configs/extensions.conf
asterisk/team/pabelanger/localhostBindaddr/tests/directed_pickup/configs/ast1/iax.conf
- copied unchanged from r915, asterisk/team/pabelanger/localhostBindaddr/tests/directed_pickup/configs/iax.conf
Removed:
asterisk/team/pabelanger/localhostBindaddr/tests/directed_pickup/configs/extensions.conf
asterisk/team/pabelanger/localhostBindaddr/tests/directed_pickup/configs/iax.conf
Modified:
asterisk/team/pabelanger/localhostBindaddr/tests/directed_pickup/run-test
Modified: asterisk/team/pabelanger/localhostBindaddr/tests/directed_pickup/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/localhostBindaddr/tests/directed_pickup/run-test?view=diff&rev=918&r1=917&r2=918
==============================================================================
--- asterisk/team/pabelanger/localhostBindaddr/tests/directed_pickup/run-test (original)
+++ asterisk/team/pabelanger/localhostBindaddr/tests/directed_pickup/run-test Mon Nov 22 22:02:56 2010
@@ -18,6 +18,9 @@
sys.path.append("lib/python")
from asterisk.asterisk import Asterisk
from asterisk.version import AsteriskVersion
+
+workingdir = "/tmp/asterisk-testsuite/directed_pickup"
+testdir = "tests/directed_pickup"
NOT_RUN = 0
PASS = 1
@@ -51,12 +54,12 @@
reactor.callWhenRunning(self.run)
print self.ast_version
- self.asterisk1 = Asterisk(base=os.path.join(os.getcwd(), "/tmp/asterisk-testsuite/directed_pickup"))
- self.asterisk1.install_configs("tests/directed_pickup/configs")
+ self.ast1 = Asterisk(base=workingdir))
+ self.ast1.install_configs("%s/configs" % (testdir))
def shut_down(self):
self.log_last_step("Reading results")
- self.asterisk1.cli_exec("core show channels")# if channels are still up for some reason, we want to know that as well
+ self.ast1.cli_exec("core show channels")# if channels are still up for some reason, we want to know that as well
self.stop_asterisk()
@@ -82,7 +85,7 @@
# set the result, schedule next step
def handle_result(self, result):
- self.asterisk1.cli_exec("console hangup")
+ self.ast1.cli_exec("console hangup")
if self.test1_res == NOT_RUN:
self.log_last_step("Pickup Test 1 results came in.")
@@ -112,22 +115,22 @@
return self.handle_agi_result(agi)
def test1_pickup(self):
- self.asterisk1.cli_exec("core show channels")
+ self.ast1.cli_exec("core show channels")
self.log_last_step("Issuing the pickup")
- self.asterisk1.cli_exec("console dial 1002 at pickuptest")
+ self.ast1.cli_exec("console dial 1002 at pickuptest")
def launch_test1(self):
self.log_last_step("Starting Test 1")
if self.ast_version < AsteriskVersion("1.6.2"):
- self.asterisk1.cli_exec("originate IAX2/iax_pickup_b at 127.0.0.1/waiting_exten extension 1001 at pickuptest")
+ self.ast1.cli_exec("originate IAX2/iax_pickup_b at 127.0.0.1/waiting_exten extension 1001 at pickuptest")
else:
- self.asterisk1.cli_exec("channel originate IAX2/iax_pickup_b at 127.0.0.1/waiting_exten extension 1001 at pickuptest")
+ self.ast1.cli_exec("channel originate IAX2/iax_pickup_b at 127.0.0.1/waiting_exten extension 1001 at pickuptest")
reactor.callLater(2, self.test1_pickup)
def test2_pickup(self):
- self.asterisk1.cli_exec("core show channels")
+ self.ast1.cli_exec("core show channels")
self.log_last_step("Issuing the pickup")
- self.asterisk1.cli_exec("console dial 1003 at pickuptest")
+ self.ast1.cli_exec("console dial 1003 at pickuptest")
def launch_test2(self):
self.log_last_step("Starting Test 2")
@@ -136,15 +139,15 @@
self.test2 = SKIP
reactor.callLater(2, self.shut_down)
else:
- self.asterisk1.cli_exec("channel originate IAX2/iax_pickup_b at 127.0.0.1/waiting_exten extension 1001 at pickuptest")
+ self.ast1.cli_exec("channel originate IAX2/iax_pickup_b at 127.0.0.1/waiting_exten extension 1001 at pickuptest")
reactor.callLater(2, self.test2_pickup)
def start_asterisk(self):
self.log_last_step("Starting Asterisk")
- self.asterisk1.start()
+ self.ast1.start()
def stop_asterisk(self):
- self.asterisk1.stop()
+ self.ast1.stop()
def log_last_step(self, step):
print step
More information about the asterisk-commits
mailing list