[asterisk-commits] pabelanger: branch pabelanger/RemoveOptionParser r1956 - in /asterisk/team/pa...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Aug 26 09:28:44 CDT 2011


Author: pabelanger
Date: Fri Aug 26 09:28:40 2011
New Revision: 1956

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=1956
Log:
Add cli_aliases.conf files
Remove ast_version logic

Added:
    asterisk/team/pabelanger/RemoveOptionParser/configs/cli_aliases.conf   (with props)
Modified:
    asterisk/team/pabelanger/RemoveOptionParser/tests/chanspy/chanspy_barge/run-test
    asterisk/team/pabelanger/RemoveOptionParser/tests/chanspy/chanspy_w_mixmonitor/run-test
    asterisk/team/pabelanger/RemoveOptionParser/tests/directed_pickup/run-test
    asterisk/team/pabelanger/RemoveOptionParser/tests/iax2/basic-call/run-test
    asterisk/team/pabelanger/RemoveOptionParser/tests/mixmonitor/run-test
    asterisk/team/pabelanger/RemoveOptionParser/tests/mixmonitor_audiohook_inherit/run-test

Added: asterisk/team/pabelanger/RemoveOptionParser/configs/cli_aliases.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/RemoveOptionParser/configs/cli_aliases.conf?view=auto&rev=1956
==============================================================================
--- asterisk/team/pabelanger/RemoveOptionParser/configs/cli_aliases.conf (added)
+++ asterisk/team/pabelanger/RemoveOptionParser/configs/cli_aliases.conf Fri Aug 26 09:28:40 2011
@@ -1,0 +1,5 @@
+[general]
+template = testsuite
+
+[testsuite]
+core set global=dialplan set global

Propchange: asterisk/team/pabelanger/RemoveOptionParser/configs/cli_aliases.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/pabelanger/RemoveOptionParser/configs/cli_aliases.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/pabelanger/RemoveOptionParser/configs/cli_aliases.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/team/pabelanger/RemoveOptionParser/tests/chanspy/chanspy_barge/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/RemoveOptionParser/tests/chanspy/chanspy_barge/run-test?view=diff&rev=1956&r1=1955&r2=1956
==============================================================================
--- asterisk/team/pabelanger/RemoveOptionParser/tests/chanspy/chanspy_barge/run-test (original)
+++ asterisk/team/pabelanger/RemoveOptionParser/tests/chanspy/chanspy_barge/run-test Fri Aug 26 09:28:40 2011
@@ -60,10 +60,7 @@
         self.ast1.cli_exec("core show locks")   # get lock output in case of deadlock before tearing down.
         self.ast1.cli_exec("core show channels")# if channels are still up for some reason, we want to know that as well
 
-        if self.ast_version < AsteriskVersion("1.6.1"):
-            self.ast1.cli_exec("core show globals") # The global variables here hold failure conditions
-        else:
-            self.ast1.cli_exec("dialplan show globals") # The global variables here hold failure conditions
+        self.ast1.cli_exec("core show globals") # The global variables here hold failure conditions
 
         if self.passed == True:
             print 'SIP ChanSpy test PASSED!'
@@ -120,12 +117,8 @@
         self.pja = subprocess.Popen(['pjsua', '--local-port=5065', '--auto-answer=200', '--null-audio', '--auto-loop'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
         self.pjb = subprocess.Popen(['pjsua', '--local-port=5066', '--auto-answer=200', playfilearg, '--null-audio', '--auto-play'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
 
-        if self.ast_version < AsteriskVersion("1.6.1"):
-            self.ast1.cli_exec("core set global TESTAUDIO1 " + self.audiofile1)
-            self.ast1.cli_exec("core set global TALK_AUDIO " + self.talkingaudio)
-        else:
-            self.ast1.cli_exec("dialplan set global TESTAUDIO1 " + self.audiofile1)
-            self.ast1.cli_exec("dialplan 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)
 
     def stopProcesses(self):
         self.logLastStep("Stopping Processes")
@@ -139,16 +132,10 @@
 
     def callChanSpy(self):
         self.logLastStep("Placing call to ChanSpy extension.")
-        if self.ast_version < AsteriskVersion("1.6.2"):
-            self.ast1.cli_exec("originate SIP/end_b extension chanspytest at test")
-        else:
-            self.ast1.cli_exec("channel originate SIP/end_b extension chanspytest at test")
+        self.ast1.cli_originate("SIP/end_b extension chanspytest at test")
 
     def verifyAudio(self):
-        if self.ast_version < AsteriskVersion("1.6.2"):
-            self.ast1.cli_exec("originate Local/play_recording at test extension detect_audio at test")
-        else:
-            self.ast1.cli_exec("channel originate Local/play_recording at test extension detect_audio at test")
+        self.ast1.cli_originate("Local/play_recording at test extension detect_audio at test")
 
     def run(self):
         # call extensions

Modified: asterisk/team/pabelanger/RemoveOptionParser/tests/chanspy/chanspy_w_mixmonitor/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/RemoveOptionParser/tests/chanspy/chanspy_w_mixmonitor/run-test?view=diff&rev=1956&r1=1955&r2=1956
==============================================================================
--- asterisk/team/pabelanger/RemoveOptionParser/tests/chanspy/chanspy_w_mixmonitor/run-test (original)
+++ asterisk/team/pabelanger/RemoveOptionParser/tests/chanspy/chanspy_w_mixmonitor/run-test Fri Aug 26 09:28:40 2011
@@ -121,12 +121,8 @@
         self.pjb = subprocess.Popen(['pjsua', '--local-port=5066', '--auto-answer=200', '--null-audio'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
         self.pjc = subprocess.Popen(['pjsua', '--local-port=5067', '--auto-answer=200', '--null-audio'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
 
-        if self.ast_version < AsteriskVersion("1.6.1"):
-            self.ast1.cli_exec("core set global TESTAUDIO1 " + self.audiofile1)
-            self.ast1.cli_exec("core set global TALK_AUDIO " + self.talkingaudio)
-        else:
-            self.ast1.cli_exec("dialplan set global TESTAUDIO1 " + self.audiofile1)
-            self.ast1.cli_exec("dialplan 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)
 
     def stopProcesses(self):
         self.logLastStep("Stopping Processes")

Modified: asterisk/team/pabelanger/RemoveOptionParser/tests/directed_pickup/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/RemoveOptionParser/tests/directed_pickup/run-test?view=diff&rev=1956&r1=1955&r2=1956
==============================================================================
--- asterisk/team/pabelanger/RemoveOptionParser/tests/directed_pickup/run-test (original)
+++ asterisk/team/pabelanger/RemoveOptionParser/tests/directed_pickup/run-test Fri Aug 26 09:28:40 2011
@@ -100,35 +100,21 @@
 
     def test1_pickup(self):
         self.log_last_step("Issuing the pickup")
-        if self.ast_version < AsteriskVersion("1.6.2"):
-            self.ast1.cli_exec("originate Local/1002 at pickuptest application echo")
-        else:
-            self.ast1.cli_exec("channel originate Local/1002 at pickuptest application echo")
+        self.ast1.cli_originate("Local/1002 at pickuptest application echo")
 
     def launch_test1(self):
         self.log_last_step("Starting Test 1")
-        if self.ast_version < AsteriskVersion("1.6.2"):
-            self.ast1.cli_exec("originate IAX2/iax_pickup_b at 127.0.0.1/waiting_exten extension 1001 at pickuptest")
-        else:
-            self.ast1.cli_exec("channel originate IAX2/iax_pickup_b at 127.0.0.1/waiting_exten extension 1001 at pickuptest")
+        self.ast1.cli_originate("IAX2/iax_pickup_b at 127.0.0.1/waiting_exten extension 1001 at pickuptest")
         self.test1_pickup()
 
     def test2_pickup(self):
         self.log_last_step("Issuing the pickup")
-        if self.ast_version < AsteriskVersion("1.6.2"):
-            self.ast1.cli_exec("originate Local/1003 at pickuptest application echo")
-        else:
-            self.ast1.cli_exec("channel originate Local/1003 at pickuptest application echo")
+        self.ast1.cli_originate("Local/1003 at pickuptest application echo")
 
     def launch_test2(self):
         self.log_last_step("Starting Test 2")
-        if self.ast_version < AsteriskVersion("1.8"):
-            # this part requires version 1.8 or greater.
-            self.test2 = SKIP
-            self.shut_down()
-        else:
-            self.ast1.cli_exec("channel originate IAX2/iax_pickup_b at 127.0.0.1/waiting_exten extension 1001 at pickuptest")
-            self.test2_pickup()
+        self.ast1.cli_originate("IAX2/iax_pickup_b at 127.0.0.1/waiting_exten extension 1001 at pickuptest")
+        self.test2_pickup()
 
     def start_asterisk(self):
         self.log_last_step("Starting Asterisk")

Modified: asterisk/team/pabelanger/RemoveOptionParser/tests/iax2/basic-call/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/RemoveOptionParser/tests/iax2/basic-call/run-test?view=diff&rev=1956&r1=1955&r2=1956
==============================================================================
--- asterisk/team/pabelanger/RemoveOptionParser/tests/iax2/basic-call/run-test (original)
+++ asterisk/team/pabelanger/RemoveOptionParser/tests/iax2/basic-call/run-test Fri Aug 26 09:28:40 2011
@@ -82,15 +82,8 @@
 
         reactor.callLater(20, self.stop_reactor)
 
-        if self.ast_version < AsteriskVersion("1.6.0"):
-            self.ast1.cli_exec("iax2 set debug")
-            self.ast2.cli_exec("iax2 set debug")
-        else:
-            self.ast1.cli_exec("iax2 set debug on")
-            self.ast2.cli_exec("iax2 set debug on")
-
-        self.ast1.cli_exec(
-                "originate IAX2/guest at 127.0.0.1:4569/1000 extension 1000 at iaxtest")
+        self.ast1.cli_originate(
+                "IAX2/guest at 127.0.0.1:4569/1000 extension 1000 at iaxtest")
 
 
 def main(argv=None):

Modified: asterisk/team/pabelanger/RemoveOptionParser/tests/mixmonitor/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/RemoveOptionParser/tests/mixmonitor/run-test?view=diff&rev=1956&r1=1955&r2=1956
==============================================================================
--- asterisk/team/pabelanger/RemoveOptionParser/tests/mixmonitor/run-test (original)
+++ asterisk/team/pabelanger/RemoveOptionParser/tests/mixmonitor/run-test Fri Aug 26 09:28:40 2011
@@ -91,16 +91,10 @@
         self.log_last_step("Starting Asterisk")
         self.ast1.start()
 
-        if self.ast_version < AsteriskVersion("1.6.1"):
-            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.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)
+        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)
 
     def stop_asterisk(self):
         self.ast1.stop()

Modified: asterisk/team/pabelanger/RemoveOptionParser/tests/mixmonitor_audiohook_inherit/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/RemoveOptionParser/tests/mixmonitor_audiohook_inherit/run-test?view=diff&rev=1956&r1=1955&r2=1956
==============================================================================
--- asterisk/team/pabelanger/RemoveOptionParser/tests/mixmonitor_audiohook_inherit/run-test (original)
+++ asterisk/team/pabelanger/RemoveOptionParser/tests/mixmonitor_audiohook_inherit/run-test Fri Aug 26 09:28:40 2011
@@ -90,10 +90,7 @@
         self.log_last_step("Starting Asterisk")
         self.ast1.start()
 
-        if self.ast_version < AsteriskVersion("1.6.1"):
-            self.ast1.cli_exec("core set global TESTAUDIO1 " + self.audiofile1)
-        else:
-            self.ast1.cli_exec("dialplan set global TESTAUDIO1 " + self.audiofile1)
+        self.ast1.cli_exec("core set global TESTAUDIO1 " + self.audiofile1)
 
     def stop_asterisk(self):
         self.ast1.stop()




More information about the asterisk-commits mailing list