[svn-commits] pabelanger: branch pabelanger/autoload r965 - in /asterisk/team/pabelanger/au...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Nov 25 21:36:41 CST 2010


Author: pabelanger
Date: Thu Nov 25 21:36:37 2010
New Revision: 965

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=965
Log:
Final tests.

Added:
    asterisk/team/pabelanger/autoload/tests/blind-transfer-parkingtimeout/configs/modules.modules.conf.inc
      - copied, changed from r943, asterisk/team/pabelanger/autoload/tests/blind-transfer-parkingtimeout/configs/modules.conf.inc
    asterisk/team/pabelanger/autoload/tests/fastagi/configs/ast1/
    asterisk/team/pabelanger/autoload/tests/fastagi/configs/ast1/extensions.conf
      - copied unchanged from r958, asterisk/team/pabelanger/autoload/tests/fastagi/configs/extensions.conf
    asterisk/team/pabelanger/autoload/tests/fastagi/configs/ast1/manager.conf
      - copied unchanged from r958, asterisk/team/pabelanger/autoload/tests/fastagi/configs/manager.conf
Removed:
    asterisk/team/pabelanger/autoload/tests/blind-transfer-parkingtimeout/configs/modules.conf.inc
    asterisk/team/pabelanger/autoload/tests/fastagi/configs/extensions.conf
    asterisk/team/pabelanger/autoload/tests/fastagi/configs/manager.conf
Modified:
    asterisk/team/pabelanger/autoload/tests/fastagi/channel-status/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/connect/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/control-stream-file/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/database/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/execute/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/get-data/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/hangup/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/record-file/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/say-alpha/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/say-date/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/say-datetime/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/say-digits/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/say-number/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/say-phonetic/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/say-time/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/stream-file/run-test
    asterisk/team/pabelanger/autoload/tests/fastagi/wait-for-digit/run-test

Copied: asterisk/team/pabelanger/autoload/tests/blind-transfer-parkingtimeout/configs/modules.modules.conf.inc (from r943, asterisk/team/pabelanger/autoload/tests/blind-transfer-parkingtimeout/configs/modules.conf.inc)
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/blind-transfer-parkingtimeout/configs/modules.modules.conf.inc?view=diff&rev=965&p1=asterisk/team/pabelanger/autoload/tests/blind-transfer-parkingtimeout/configs/modules.conf.inc&r1=943&p2=asterisk/team/pabelanger/autoload/tests/blind-transfer-parkingtimeout/configs/modules.modules.conf.inc&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/blind-transfer-parkingtimeout/configs/modules.conf.inc (original)
+++ asterisk/team/pabelanger/autoload/tests/blind-transfer-parkingtimeout/configs/modules.modules.conf.inc Thu Nov 25 21:36:37 2010
@@ -1,6 +1,3 @@
-load => res_agi.so
-load => res_clioriginate.so
-
 load => chan_iax2.so
 
 load => app_dial.so

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/channel-status/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/channel-status/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/channel-status/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/channel-status/run-test Thu Nov 25 21:36:37 2010
@@ -17,6 +17,9 @@
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
 
+workingdir = "/tmp/asterisk-testsuite/fastagi/channel-status"
+testdir = "tests/fastagi"
+
 class FastAGIChannelStatusTest:
     def __init__(self, argv):
         self.passed = {'4': False, '6':False}
@@ -34,9 +37,8 @@
         reactor.listenTCP(4573, self.agi_factory, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/fastagi/channel-status")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1 = Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1" % (testdir))
 
     def on_answer_failure(self, reason):
         print 'Could not answer the call:', reason.getTraceback()
@@ -84,12 +86,12 @@
         if self.passed[4] is True and self.passed[6] is True:
             print "PASS - FastAGI CHANNEL STATUS works as expected."
         else:
-            self.asterisk.cli_exec("core show channels")
+            self.ast1.cli_exec("core show channels")
 
             if self.ast_version < AsteriskVersion("1.6.1"):
-                self.asterisk.cli_exec("core show globals")
+                self.ast1.cli_exec("core show globals")
             else:
-                self.asterisk.cli_exec("dialplan show globals")
+                self.ast1.cli_exec("dialplan show globals")
 
             print "FAIL - View result of 'core show globals' in log for",\
                 "more detailed failure results."
@@ -103,23 +105,23 @@
             reactor.stop()
 
     def launch_test(self):
-        self.asterisk.cli_exec("agi set debug on")
+        self.ast1.cli_exec("agi set debug on")
 
         # Set blocking=False so that we can test channel
         # status before call is answered.
         print "Originating call to begin test."
-        self.asterisk.cli_originate(
+        self.ast1.cli_originate(
             "Local/no_answer at agitest extension echo at agitest", blocking=False
         )
 
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout 
     def result_changed(self):

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/connect/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/connect/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/connect/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/connect/run-test Thu Nov 25 21:36:37 2010
@@ -17,6 +17,9 @@
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
 
+workingdir = "/tmp/asterisk-testsuite/fastagi/connect"
+testdir = "tests/fastagi"
+
 class FastAGIConnectTest:
     def __init__(self, argv):
         self.passed = False
@@ -33,9 +36,8 @@
         reactor.listenTCP(4573, self.agi_factory, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/fastagi/connect")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1 = Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1" % (testdir))
 
     # This gets invoked by the dialplan when the call is answered
     # Disconnect agi and set test result values
@@ -51,12 +53,12 @@
         if self.passed is True:
             print "PASS - FastAGI connection works as expected."
         else:
-            self.asterisk.cli_exec("core show channels")
+            self.ast1.cli_exec("core show channels")
 
             if self.ast_version < AsteriskVersion("1.6.1"):
-                self.asterisk.cli_exec("core show globals")
+                self.ast1.cli_exec("core show globals")
             else:
-                self.asterisk.cli_exec("dialplan show globals")
+                self.ast1.cli_exec("dialplan show globals")
 
             print "FAIL - FastAGI Connection test failed. View result of\
                     'core show globals' in log for more detailed failure\
@@ -70,17 +72,17 @@
 
     def launch_test(self):
         print "Originating call to begin test."
-        self.asterisk.cli_originate(
+        self.ast1.cli_originate(
             "Local/basic_agi at agitest extension echo at agitest"
         )
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout 
     def result_changed(self):

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/control-stream-file/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/control-stream-file/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/control-stream-file/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/control-stream-file/run-test Thu Nov 25 21:36:37 2010
@@ -17,6 +17,9 @@
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
 
+workingdir ="/tmp/asterisk-testsuite/fastagi/control-stream-file"
+testdir = "tests/fastagi"
+
 class FastAGIControlStreamFileTest:
     def __init__(self, argv):
         self.passed = False
@@ -33,9 +36,8 @@
         reactor.listenTCP(4573, self.agi_factory, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/fastagi/control-stream-file")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1 = Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1" % (testdir))
 
     def on_failure(self, reason):
         print 'Could not run CONTROL STREAM FILE: ', reason.getTraceback()
@@ -62,12 +64,12 @@
         if self.passed is True:
             print "PASS - FastAGI CONTROL STREAM FILE works as expected."
         else:
-            self.asterisk.cli_exec("core show channels")
+            self.ast1.cli_exec("core show channels")
 
             if self.ast_version < AsteriskVersion("1.6.1"):
-                self.asterisk.cli_exec("core show globals")
+                self.ast1.cli_exec("core show globals")
             else:
-                self.asterisk.cli_exec("dialplan show globals")
+                self.ast1.cli_exec("dialplan show globals")
                 print "FAIL - FastAGI CONTROL STREAM FILE test failed. You",\
                     "may need to update StarPy. Starpy 1.0.0a13 and older",\
                     "will always fail this test."
@@ -84,17 +86,17 @@
         self.asterisk.cli_exec("agi set debug on")
 
         print "Originating call to begin test."
-        self.asterisk.cli_originate(
+        self.ast1.cli_originate(
             "Local/basic_agi at agitest extension echo at agitest"
         )
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout
     def result_changed(self):

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/database/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/database/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/database/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/database/run-test Thu Nov 25 21:36:37 2010
@@ -16,6 +16,9 @@
 sys.path.append("lib/python")
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
+
+workingdir = "/tmp/asterisk-testsuite/fastagi/database"
+testdir = "tests/fastagi"
 
 class FastAGIDatabaseTest:
     def __init__(self, argv):
@@ -36,9 +39,8 @@
         reactor.listenTCP(4573, self.agi_factory, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/fastagi/database")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1 = Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1" % (testdir))
 
     def on_del_failure(self, reason):
         print 'Could not delete the data from the database.'
@@ -184,20 +186,20 @@
             reactor.stop()
 
     def launch_test(self):
-        self.asterisk.cli_exec("agi set debug on")
+        self.ast1.cli_exec("agi set debug on")
 
         print "Originating call to begin test."
-        self.asterisk.cli_originate(
+        self.ast1.cli_originate(
             "Local/basic_agi at agitest extension echo at agitest"
         )
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout
     def result_changed(self):

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/execute/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/execute/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/execute/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/execute/run-test Thu Nov 25 21:36:37 2010
@@ -16,6 +16,9 @@
 sys.path.append("lib/python")
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
+
+workingdir = "/tmp/asterisk-testsuite/fastagi/execute"
+testdir = "tests/fastagi"
 
 class FastAGIExecuteTest:
     def __init__(self, argv):
@@ -41,9 +44,8 @@
         reactor.listenTCP(4573, self.agi_factory, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk=Asterisk(base="/tmp/asterisk-testsuite/fastagi/execute")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1=Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1")
 
     def on_get_variable2_failure(self, reason):
         self.passed['Set [Channel]'] = False
@@ -170,19 +172,19 @@
             reactor.stop()
 
     def launch_test(self):
-        self.asterisk.cli_exec("agi set debug on")
+        self.ast1.cli_exec("agi set debug on")
         print "Originating call to begin test."
-        self.asterisk.cli_originate(
+        self.ast1.cli_originate(
             "Local/basic_agi at agitest extension echo at agitest"
         )
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout
     def result_changed(self):

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/get-data/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/get-data/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/get-data/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/get-data/run-test Thu Nov 25 21:36:37 2010
@@ -17,6 +17,9 @@
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
 
+workingdir = "/tmp/asterisk-testsuite/fastagi/get-data")
+testdir = "tests/fastagi/configs"
+
 class FastAGIGetDataTest:
     def __init__(self, argv):
         self.passed = False
@@ -33,9 +36,8 @@
         reactor.listenTCP(4573, self.agi_factory, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/fastagi/get-data")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1 = Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1")
 
     def on_failure(self, reason):
         print 'Could not run GET DATA: ', reason.getTraceback()
@@ -71,12 +73,12 @@
         if self.passed is True:
             print "PASS - FastAGI GET DATA works as expected."
         else:
-            self.asterisk.cli_exec("core show channels")
+            self.ast1.cli_exec("core show channels")
 
             if self.ast_version < AsteriskVersion("1.6.1"):
-                self.asterisk.cli_exec("core show globals")
+                self.ast1.cli_exec("core show globals")
             else:
-                self.asterisk.cli_exec("dialplan show globals")
+                self.ast1.cli_exec("dialplan show globals")
 
             print "FAIL - FastAGI GET DATA test failed. View result",\
                     "of 'core show globals' in log for more detailed",\
@@ -89,20 +91,20 @@
             reactor.stop()
 
     def launch_test(self):
-        self.asterisk.cli_exec("agi set debug on")
+        self.ast1.cli_exec("agi set debug on")
 
         print "Originating call to begin test."
-        self.asterisk.cli_originate(
+        self.ast1.cli_originate(
             "Local/basic_agi at agitest extension play_dtmf at agitest"
         )
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout
     def result_changed(self):

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/hangup/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/hangup/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/hangup/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/hangup/run-test Thu Nov 25 21:36:37 2010
@@ -18,6 +18,9 @@
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
 
+workingdir = "/tmp/asterisk-testsuite/fastagi/channel-status"
+testdir = "tests/fastagi"
+
 class FastAGIHangupTest:
     def __init__(self, argv):
         self.passed = False
@@ -35,9 +38,8 @@
         reactor.listenTCP(4573, self.agi_factory, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/fastagi/channel-status")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1 = Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1" % (testdir))
 
     def on_hangup_failure(self, reason):
         print 'Could not hangup:', reason.getTraceback()
@@ -91,12 +93,12 @@
         if self.passed is True:
             print "PASS - FastAGI HANGUP works as expected."
         else:
-            self.asterisk.cli_exec("core show channels")
+            self.ast1.cli_exec("core show channels")
 
             if self.ast_version < AsteriskVersion("1.6.1"):
-                self.asterisk.cli_exec("core show globals")
+                self.ast1.cli_exec("core show globals")
             else:
-                self.asterisk.cli_exec("dialplan show globals")
+                self.ast1.cli_exec("dialplan show globals")
 
             print "FAIL - View result of 'core show globals' in log for more",\
                 "detailed failure results."
@@ -108,20 +110,20 @@
             reactor.stop()
 
     def launch_test(self):
-        self.asterisk.cli_exec("agi set debug on")
+        self.ast1.cli_exec("agi set debug on")
 
         print "Originating call to begin test."
-        self.asterisk.cli_originate(
+        self.ast1.cli_originate(
             "Local/basic_agi at agitest extension echo at agitest"
         )
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout
     def result_changed(self):

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/record-file/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/record-file/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/record-file/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/record-file/run-test Thu Nov 25 21:36:37 2010
@@ -16,6 +16,9 @@
 sys.path.append("lib/python")
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
+
+workingdir = "/tmp/asterisk-testsuite/fastagi/execute"
+testdir = "tests/fastagi"
 
 class FastAGIRecordFileTest:
     def __init__(self, argv):
@@ -40,17 +43,15 @@
         reactor.listenTCP(4573, self.agi_factory, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk=Asterisk(base="/tmp/asterisk-testsuite/fastagi/execute")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1 = Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1" % (testdir))
+	self.record_file = "%s/out.ulaw" % (workingdir)
 
     def on_record_failure(self, reason):
-        if os.path.exists("/tmp/asterisk-testsuite/fastagi/execute/out.ulaw"):
+        if os.path.exists(self.record_file):
             print "file exists"
 
-        print "file size is", os.path.getsize(
-            "/tmp/asterisk-testsuite/fastagi/execute/out.ulaw"
-        )
+        print "file size is", os.path.getsize(self.record_file)
         self.passed[self.test] = False
         print 'Could not record file:', reason.getTraceback()
         if self.test is "DTMF":
@@ -67,10 +68,8 @@
 
         print "Recording terminated by %s (%s) after %s bytes."\
             % (result[1], digit, result[2])
-        if os.path.exists("/tmp/asterisk-testsuite/fastagi/execute/out.ulaw"):
-            file_size = os.path.getsize(
-                "/tmp/asterisk-testsuite/fastagi/execute/out.ulaw"
-            )
+        if os.path.exists(self.record_file)
+            file_size = os.path.getsize(self.record_file)
             if file_size == 0:
                 print "The file was created, but it is empty."
                 self.passed[self.test] = False
@@ -95,8 +94,7 @@
     # This gets invoked by the dialplan when the call is answered
     def do_test(self, agi):
         self.agi = agi
-        return agi.recordFile(
-            "/tmp/asterisk-testsuite/fastagi/execute/out", "ulaw", "#", "3"
+        return agi.recordFile("%s/out" % (workingdir), "ulaw", "#", "3"
         ).addCallback(
             self.on_record_success
         ).addErrback(self.on_record_failure)
@@ -111,12 +109,12 @@
                 self.overall_result = False
 
         if self.overall_result is False:
-            self.asterisk.cli_exec("core show channels")
+            self.ast1.cli_exec("core show channels")
 
             if self.ast_version < AsteriskVersion("1.6.1"):
-                self.asterisk.cli_exec("core show globals")
+                self.ast1.cli_exec("core show globals")
             else:
-                self.asterisk.cli_exec("dialplan show globals")
+                self.ast1.cli_exec("dialplan show globals")
 
             print "FAIL - FastAGI RECORD FILE test failed. View result",\
                     "of 'core show globals' in log for more detailed",\
@@ -128,15 +126,15 @@
             reactor.stop()
 
     def launch_test(self):
-        self.asterisk.cli_exec("agi set debug on")
+        self.ast1.cli_exec("agi set debug on")
         print "Originating call to begin test which terminates recording",\
             "with", self.test
         if self.test is "DTMF":
-            self.asterisk.cli_originate(
+            self.ast1.cli_originate(
                 "Local/basic_agi at agitest extension play_snd_and_term at agitest"
             )
         elif self.test is "HANGUP":
-            self.asterisk.cli_originate(
+            self.ast1.cli_originate(
                 "Local/basic_agi at agitest extension play_snd_and_hangup at agitest"
             )
         else:
@@ -144,11 +142,11 @@
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout
     def result_changed(self):

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/say-alpha/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/say-alpha/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/say-alpha/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/say-alpha/run-test Thu Nov 25 21:36:37 2010
@@ -16,6 +16,9 @@
 sys.path.append("lib/python")
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
+
+workingdir = "/tmp/asterisk-testsuite/fastagi/say-alpha"
+testdir = "tests/fastagi"
 
 class FastAGISayAlphaTest:
     def __init__(self, argv):
@@ -38,9 +41,8 @@
         reactor.listenTCP(4574, self.agi_factory2, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/fastagi/say-alpha")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1 = Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1" % (testdir))
 
     def listen_result(self, agi):
         print "Got test success confirmation from dialplan."
@@ -71,12 +73,12 @@
         if self.passed is True and self.notified is True:
             print "PASS - FastAGI SAY ALPHA works as expected."
         else:
-            self.asterisk.cli_exec("core show channels")
+            self.ast1.cli_exec("core show channels")
 
             if self.ast_version < AsteriskVersion("1.6.1"):
-                self.asterisk.cli_exec("core show globals")
+                self.ast1.cli_exec("core show globals")
             else:
-                self.asterisk.cli_exec("dialplan show globals")
+                self.ast1.cli_exec("dialplan show globals")
                 print "AGI reports success: ", self.passed
                 print "Diaplan reports success: ", self.notified
 
@@ -91,20 +93,20 @@
             reactor.stop()
 
     def launch_test(self):
-        self.asterisk.cli_exec("agi set debug on")
+        self.ast1.cli_exec("agi set debug on")
 
         print "Originating call to begin test."
-        self.asterisk.cli_originate(
+        self.ast1.cli_originate(
             "Local/basic_agi at agitest extension td_and_agi_notify at agitest"
         )
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout
     def result_changed(self):

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/say-date/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/say-date/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/say-date/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/say-date/run-test Thu Nov 25 21:36:37 2010
@@ -16,6 +16,9 @@
 sys.path.append("lib/python")
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
+
+workingdir = "/tmp/asterisk-testsuite/fastagi/say-date"
+testdir = "tests/fastagi"
 
 class FastAGISayDateTest:
     def __init__(self, argv):
@@ -39,9 +42,8 @@
         reactor.listenTCP(4574, self.agi_factory2, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/fastagi/say-date")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1 = Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1" % (testdir))
 
     def listen_result(self, agi):
         print "Got test success confirmation from dialplan."
@@ -72,12 +74,12 @@
         if self.passed is True and self.notified is True:
             print "PASS - FastAGI SAY DATE works as expected."
         else:
-            self.asterisk.cli_exec("core show channels")
+            self.ast1.cli_exec("core show channels")
 
             if self.ast_version < AsteriskVersion("1.6.1"):
-                self.asterisk.cli_exec("core show globals")
+                self.ast1.cli_exec("core show globals")
             else:
-                self.asterisk.cli_exec("dialplan show globals")
+                self.ast1.cli_exec("dialplan show globals")
                 print "AGI reports success: ", self.passed
                 print "Diaplan reports success: ", self.notified
 
@@ -92,20 +94,20 @@
             reactor.stop()
 
     def launch_test(self):
-        self.asterisk.cli_exec("agi set debug on")
+        self.ast1.cli_exec("agi set debug on")
 
         print "Originating call to begin test."
-        self.asterisk.cli_originate(
+        self.ast1.cli_originate(
             "Local/basic_agi at agitest extension td_and_agi_notify at agitest"
         )
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout
     def result_changed(self):

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/say-datetime/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/say-datetime/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/say-datetime/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/say-datetime/run-test Thu Nov 25 21:36:37 2010
@@ -16,6 +16,9 @@
 sys.path.append("lib/python")
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
+
+workingdir = "/tmp/asterisk-testsuite/fastagi/say-datetime"
+testdir = "tests/fastagi"
 
 class FastAGISayDateTimeTest:
     def __init__(self, argv):
@@ -38,9 +41,8 @@
         reactor.listenTCP(4574, self.agi_factory2, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/fastagi/say-datetime")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1 = Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1" % (testdir))
 
     def listen_result(self, agi):
         print "Got test success confirmation from dialplan."
@@ -71,12 +73,12 @@
         if self.passed is True and self.notified is True:
             print "PASS - FastAGI SAY DATETIME works as expected."
         else:
-            self.asterisk.cli_exec("core show channels")
+            self.ast1.cli_exec("core show channels")
 
             if self.ast_version < AsteriskVersion("1.6.1"):
-                self.asterisk.cli_exec("core show globals")
+                self.ast1.cli_exec("core show globals")
             else:
-                self.asterisk.cli_exec("dialplan show globals")
+                self.ast1.cli_exec("dialplan show globals")
                 print "AGI reports success: ", self.passed
                 print "Diaplan reports success: ", self.notified
 
@@ -91,20 +93,20 @@
             reactor.stop()
 
     def launch_test(self):
-        self.asterisk.cli_exec("agi set debug on")
+        self.ast1.cli_exec("agi set debug on")
 
         print "Originating call to begin test."
-        self.asterisk.cli_originate(
+        self.ast1.cli_originate(
             "Local/basic_agi at agitest extension td_and_agi_notify at agitest"
         )
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout
     def result_changed(self):
@@ -112,7 +114,7 @@
             reactor.callLater(2, self.read_result)
 
     def run(self):
-        self.start_asterisk()
+        self.start_ast1()
         reactor.callLater(2, self.launch_test)
         reactor.callLater(self.timeout, self.read_result)
 

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/say-digits/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/say-digits/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/say-digits/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/say-digits/run-test Thu Nov 25 21:36:37 2010
@@ -16,6 +16,9 @@
 sys.path.append("lib/python")
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
+
+workingdir = "/tmp/asterisk-testsuite/fastagi/say-digits"
+testdir = "tests/fastagi"
 
 class FastAGISayDigitsTest:
     def __init__(self, argv):
@@ -38,9 +41,8 @@
         reactor.listenTCP(4574, self.agi_factory2, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/fastagi/say-digits")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1 = Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1" % (testdir))
 
     def listen_result(self, agi):
         print "Got test success confirmation from dialplan."
@@ -71,12 +73,12 @@
         if self.passed is True and self.notified is True:
             print "PASS - FastAGI SAY DIGITS works as expected."
         else:
-            self.asterisk.cli_exec("core show channels")
+            self.ast1.cli_exec("core show channels")
 
             if self.ast_version < AsteriskVersion("1.6.1"):
-                self.asterisk.cli_exec("core show globals")
+                self.ast1.cli_exec("core show globals")
             else:
-                self.asterisk.cli_exec("dialplan show globals")
+                self.ast1.cli_exec("dialplan show globals")
                 print "AGI reports success: ", self.passed
                 print "Diaplan reports success: ", self.notified
 
@@ -91,20 +93,20 @@
             reactor.stop()
 
     def launch_test(self):
-        self.asterisk.cli_exec("agi set debug on")
+        self.ast1.cli_exec("agi set debug on")
 
         print "Originating call to begin test."
-        self.asterisk.cli_originate(
+        self.ast1.cli_originate(
             "Local/basic_agi at agitest extension td_and_agi_notify at agitest"
         )
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout
     def result_changed(self):

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/say-number/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/say-number/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/say-number/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/say-number/run-test Thu Nov 25 21:36:37 2010
@@ -16,6 +16,9 @@
 sys.path.append("lib/python")
 from asterisk.asterisk import Asterisk
 from asterisk.version import AsteriskVersion
+
+workingdir = "/tmp/asterisk-testsuite/fastagi/say-number"
+testdir = "tests/fastagi"
 
 class FastAGISayNumberTest:
     def __init__(self, argv):
@@ -38,9 +41,8 @@
         reactor.listenTCP(4574, self.agi_factory2, self.timeout, '127.0.0.1')
         reactor.callWhenRunning(self.run)
 
-        print self.ast_version
-        self.asterisk = Asterisk(base="/tmp/asterisk-testsuite/fastagi/say-number")
-        self.asterisk.install_configs("tests/fastagi/configs")
+        self.ast1 = Asterisk(base=workingdir)
+        self.ast1.install_configs("%s/configs/ast1" % (testdir))
 
     def listen_result(self, agi):
         print "Got test success confirmation from dialplan."
@@ -71,12 +73,12 @@
         if self.passed is True and self.notified is True:
             print "PASS - FastAGI SAY NUMBER works as expected."
         else:
-            self.asterisk.cli_exec("core show channels")
+            self.ast1.cli_exec("core show channels")
 
             if self.ast_version < AsteriskVersion("1.6.1"):
-                self.asterisk.cli_exec("core show globals")
+                self.ast1.cli_exec("core show globals")
             else:
-                self.asterisk.cli_exec("dialplan show globals")
+                self.ast1.cli_exec("dialplan show globals")
                 print "AGI reports success: ", self.passed
                 print "Diaplan reports success: ", self.notified
 
@@ -91,20 +93,20 @@
             reactor.stop()
 
     def launch_test(self):
-        self.asterisk.cli_exec("agi set debug on")
+        self.ast1.cli_exec("agi set debug on")
 
         print "Originating call to begin test."
-        self.asterisk.cli_originate(
+        self.ast1.cli_originate(
             "Local/basic_agi at agitest extension td_and_agi_notify at agitest"
         )
 
     def start_asterisk(self):
         print "Starting Asterisk"
-        self.asterisk.start()
+        self.ast1.start()
 
     def stop_asterisk(self):
         print "Stopping Asterisk"
-        self.asterisk.stop()
+        self.ast1.stop()
 
     # Read result before timeout
     def result_changed(self):

Modified: asterisk/team/pabelanger/autoload/tests/fastagi/say-phonetic/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/autoload/tests/fastagi/say-phonetic/run-test?view=diff&rev=965&r1=964&r2=965
==============================================================================
--- asterisk/team/pabelanger/autoload/tests/fastagi/say-phonetic/run-test (original)
+++ asterisk/team/pabelanger/autoload/tests/fastagi/say-phonetic/run-test Thu Nov 25 21:36:37 2010
@@ -16,6 +16,9 @@
 sys.path.append("lib/python")
 from asterisk.asterisk import Asterisk

[... 268 lines stripped ...]



More information about the svn-commits mailing list