[asterisk-scf-commits] asterisk-scf/integration/testsuite.git branch "review" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jun 15 09:42:52 CDT 2011


branch "review" has been updated
       via  8dcfd0c413855a6bd5bd13b875bf76c6ad1ab2b3 (commit)
       via  538d37a236c6c55e67b0792fbaad7f1beaf7984e (commit)
       via  62f3d9fe838c353504c59fa1cb9e52fa36d338fc (commit)
       via  e0a1f9ea4af1786d78d4b635284a92f4b9055736 (commit)
       via  693fd11148fdaeb40722186ade78ff4ad88cec09 (commit)
       via  92373f22ff005d9465344f97787e0589d7b2ba5b (commit)
       via  3991a46911c747889562b9102687f3c2d9df7958 (commit)
       via  4d03b4cf9b5983f9be8b4fe9e56e103f41724b53 (commit)
      from  d7678f71a20688cb64222c1dc3d0758869e8f07f (commit)

Summary of changes:
 events/shutdown.yaml                               |    1 +
 events/startup.yaml                                |    1 +
 lib/python/TestSuite.py                            |   10 ++++----
 plugins/build.py                                   |   11 +++++++-
 plugins/testsuite_remotes.py                       |    2 +-
 remote.py                                          |   22 +++++++++++++-----
 .../scenarios/call_then_blind_transfer.xml}        |    0
 .../scenarios/wait_for_call.xml}                   |    0
 .../scenarios/wait_for_call_do_hangup.xml}         |    0
 .../testcase.yaml                                  |   24 ++++++++++++++++---
 10 files changed, 53 insertions(+), 18 deletions(-)
 rename tests/sip/{Functional_Basic_Call_Forward_Blind/scenarios/call-then-blind-transfer.xml => Functional_Basic_Call_Forward_Blind_Transfer/scenarios/call_then_blind_transfer.xml} (100%)
 rename tests/sip/{Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call.xml => Functional_Basic_Call_Forward_Blind_Transfer/scenarios/wait_for_call.xml} (100%)
 rename tests/sip/{Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call-do-hangup.xml => Functional_Basic_Call_Forward_Blind_Transfer/scenarios/wait_for_call_do_hangup.xml} (100%)
 rename tests/sip/{Functional_Basic_Call_Forward_Blind => Functional_Basic_Call_Forward_Blind_Transfer}/testcase.yaml (79%)
 delete mode 100644 tests/sip/Stress_Maximum_Simultaneous_Calls/testcase.yaml


- Log -----------------------------------------------------------------
commit 8dcfd0c413855a6bd5bd13b875bf76c6ad1ab2b3
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 15 09:42:49 2011 -0500

    added a pkill function to the remote script for cleaning up the occasional orphaned subprocess.

diff --git a/remote.py b/remote.py
index 64d87cf..b367cc2 100755
--- a/remote.py
+++ b/remote.py
@@ -302,6 +302,13 @@ class RemoteManagement(object):
     def reset(self):
         return 1
 
+    def pkill(self, pid):
+        if pid == 'dumpcap' or pid == 'icebox' or pid == 'asterisk':
+            subprocess.Popen(['pkill', '%s' % pid])
+        else:
+            return {'success':False, 'msg':'Permission denied. You are not allowed to kill the process name, %s.' % pid}
+        return {'success':True}
+
     def restart(self):
         initScript = '/etc/init.d/testsuite-remote'
         if not os.path.exists(initScript) or not os.access(initScript, os.X_OK):

commit 538d37a236c6c55e67b0792fbaad7f1beaf7984e
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 15 09:19:42 2011 -0500

    fixed the svn support in the build plugin. had initially only implemented half-baked support for svn as the scf project uses git primarily. with having to now build SIPp from a subversion repo, svn support needed to be fleshed out in the build module.

diff --git a/plugins/build.py b/plugins/build.py
index c4eb25f..12a422b 100644
--- a/plugins/build.py
+++ b/plugins/build.py
@@ -31,9 +31,16 @@ class plugin(TestSuite.RemoteBaseClass):
         if repoInfo['repoType'] == 'git':
             repoInfo['repoGetCmd'] = 'clone'
             repoInfo['repoRefreshCmd'] = 'pull'
-        elif repoInfo['repoType'] == 'svn':
-            repoInfo['repoGetCmd'] = 'checkout'
+        elif repoInfo['repoType'] == 'http' or repoInfo['repoType'] == 'https':
+            repoInfo['repoType'] = 'svn'
+            repoInfo['repoGetCmd'] = 'co'
             repoInfo['repoRefreshCmd'] = 'update'
+        else:
+            return {'success':False, 'msg':'Unknown URL repo type.'}
+
+        results = remote['rpc']('changeDir')
+        if results['success'] == False:
+            return results
 
         if update == True:
             results = remote['rpc']('changeDir', repoInfo['repoName'])

commit 62f3d9fe838c353504c59fa1cb9e52fa36d338fc
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 15 09:17:38 2011 -0500

    added testsuite-remote-4 to the testsuite startup and shutdown events.

diff --git a/events/shutdown.yaml b/events/shutdown.yaml
index 919dc2d..403477c 100644
--- a/events/shutdown.yaml
+++ b/events/shutdown.yaml
@@ -10,4 +10,5 @@ tests :
                         - testsuite-remote-1.digium.internal
                         - testsuite-remote-2.digium.internal
                         - testsuite-remote-3.digium.internal
+                        - testsuite-remote-4.digium.internal
                         - testsuite-builder-1.digium.internal
diff --git a/events/startup.yaml b/events/startup.yaml
index 708b6d8..11a7002 100644
--- a/events/startup.yaml
+++ b/events/startup.yaml
@@ -10,4 +10,5 @@ tests :
                         - testsuite-remote-1.digium.internal
                         - testsuite-remote-2.digium.internal
                         - testsuite-remote-3.digium.internal
+                        - testsuite-remote-4.digium.internal
                         - testsuite-builder-1.digium.internal

commit e0a1f9ea4af1786d78d4b635284a92f4b9055736
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 15 09:15:19 2011 -0500

    Modified the changeDir function in remote to change to the tmp directory if no directory is specified. this was nessesary because of some previous modifications to the run function in the remote script.

diff --git a/remote.py b/remote.py
index 427dbee..64d87cf 100755
--- a/remote.py
+++ b/remote.py
@@ -185,11 +185,14 @@ class RemoteManagement(object):
             os.environ[varName] = "%s" % val
         return {'success':True}
 
-    def changeDir(self, dir):
-        dir = self._filePathCheck(dir)
-        if not os.path.exists('%s/tmp/%s' % (cwd, dir)):
-            return {'success':False,'msg':'[changeDir] The %s path does not exist.' % dir}
-        os.chdir('%s/tmp/%s' % (cwd, dir))
+    def changeDir(self, dir=None):
+        if dir:
+            dir = self._filePathCheck(dir)
+            if not os.path.exists('%s/tmp/%s' % (cwd, dir)):
+                return {'success':False,'msg':'[changeDir] The %s path does not exist.' % dir}
+            os.chdir('%s/tmp/%s' % (cwd, dir))
+        else:
+            os.chdir('%s/tmp' % cwd)
         return {'success':True,'cwd':os.getcwd()}
 
     def makeDir(self, dir):

commit 693fd11148fdaeb40722186ade78ff4ad88cec09
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 15 08:33:11 2011 -0500

    fixed the write file function to display the proper path in the except ioerror.

diff --git a/remote.py b/remote.py
index 120dce6..427dbee 100755
--- a/remote.py
+++ b/remote.py
@@ -261,7 +261,7 @@ class RemoteManagement(object):
         try:
             f = open('%s' % fn, 'w')
         except IOError:
-            return {'success':False,'msg':'[wFile] Failed to open test results output file: %s/tmp/%s' % (cwd, fn)}
+            return {'success':False,'msg':'[wFile] Failed to open test results output file: %s' % fn}
         except:
             return {'success':False,'msg':'[wFile] Unexpected error: %s' % sys.exc_info()[0]}
         f.write(fd)

commit 92373f22ff005d9465344f97787e0589d7b2ba5b
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 15 08:32:04 2011 -0500

    modified the sleep time when the remotes are restarting to decrease the startup init time.

diff --git a/plugins/testsuite_remotes.py b/plugins/testsuite_remotes.py
index 6b2b681..7e2cca0 100644
--- a/plugins/testsuite_remotes.py
+++ b/plugins/testsuite_remotes.py
@@ -26,7 +26,7 @@ class plugin(TestSuite.BaseClass):
                         return rpc[remote]
                     rpc[remote]['rpc']('restart')
 
-                time.sleep(5)
+                time.sleep(2)
 
                 ''' Check to make sure we can connect to the remotes again before we do anything else. '''
                 for remote in testData['cmd']['startup']:

commit 3991a46911c747889562b9102687f3c2d9df7958
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 15 08:30:40 2011 -0500

    modified the test-suite base rpc class to also include the fqdn of the host when making a connection so that when creating a SIPp injection file, a proper host matrix can be made.

diff --git a/lib/python/TestSuite.py b/lib/python/TestSuite.py
index 239a5c0..9ba1126 100644
--- a/lib/python/TestSuite.py
+++ b/lib/python/TestSuite.py
@@ -77,7 +77,7 @@ class utils():
             except:
                 return {'success':False,'msg':'Connection to %s was refused.' % self.host}
             ipv4, ipv6 = self.rpc[self.host].whatAreMyIps() 
-            return {'success':True, 'rpc':self.cmd, 'ipv4':ipv4, 'ipv6':ipv6, 'hostname':self.host.split('.')[0]}
+            return {'success':True, 'rpc':self.cmd, 'ipv4':ipv4, 'ipv6':ipv6, 'hostname':self.host.split('.')[0], 'fqdn':self.host}
 
         def cmd(self, cmd, *args):
             try:
@@ -107,19 +107,19 @@ class utils():
             try:
                 f = open("%s" % fn, "r")
             except IOError:
-                print "Failed to open test results output file:"
+                return {'success':False, 'msg':'Failed to open file for reading: %s' % fn}
             except:
-                print "Unexpected error: %s" % sys.exc_info()[0]
+                return {'success':False, 'msg':'Unexpected error: %s' % sys.exc_info()[0]}
             else:
                 fc = f.read()
                 f.close()
-            return fc.strip()
+            return {'success':True, 'fd':fc.strip()}
 
     class url:
         def fetchRepoInfo(self, url):
             repoName = ''
             url = urlparse(url)
-            if not url[0] == 'git' and not url[0] == 'svn':
+            if not url[0] == 'git' and not url[0] == 'http' and not url[0] == 'https':
                 return {'success':False,'msg':'The URL must be a properly formatted git or svn url.'}
             for part in url[2].split('/'):
                 repoName = part

commit 4d03b4cf9b5983f9be8b4fe9e56e103f41724b53
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 15 08:28:58 2011 -0500

    added the blind transfer test case

diff --git a/tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/call-then-blind-transfer.xml b/tests/sip/Functional_Basic_Call_Forward_Blind_Transfer/scenarios/call_then_blind_transfer.xml
similarity index 100%
rename from tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/call-then-blind-transfer.xml
rename to tests/sip/Functional_Basic_Call_Forward_Blind_Transfer/scenarios/call_then_blind_transfer.xml
diff --git a/tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call.xml b/tests/sip/Functional_Basic_Call_Forward_Blind_Transfer/scenarios/wait_for_call.xml
similarity index 100%
rename from tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call.xml
rename to tests/sip/Functional_Basic_Call_Forward_Blind_Transfer/scenarios/wait_for_call.xml
diff --git a/tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call-do-hangup.xml b/tests/sip/Functional_Basic_Call_Forward_Blind_Transfer/scenarios/wait_for_call_do_hangup.xml
similarity index 100%
rename from tests/sip/Functional_Basic_Call_Forward_Blind/scenarios/wait-for-call-do-hangup.xml
rename to tests/sip/Functional_Basic_Call_Forward_Blind_Transfer/scenarios/wait_for_call_do_hangup.xml
diff --git a/tests/sip/Functional_Basic_Call_Forward_Blind/testcase.yaml b/tests/sip/Functional_Basic_Call_Forward_Blind_Transfer/testcase.yaml
similarity index 79%
rename from tests/sip/Functional_Basic_Call_Forward_Blind/testcase.yaml
rename to tests/sip/Functional_Basic_Call_Forward_Blind_Transfer/testcase.yaml
index 54ecd2c..44b6969 100644
--- a/tests/sip/Functional_Basic_Call_Forward_Blind/testcase.yaml
+++ b/tests/sip/Functional_Basic_Call_Forward_Blind_Transfer/testcase.yaml
@@ -1,4 +1,4 @@
-name : Functional_Basic_Call_Forward_Blind
+name : Functional_Basic_Call_Forward_Blind_Transfer
 tests :
     - ipv4toipv4_transfer_to_ipv4 :
         expected_failure : False 
@@ -73,33 +73,49 @@ tests :
                             endport : 20000
                             workerthreadcount : 4
             - sipp:
+                cmd :
+                    - generate_injection_file :
+                        redistribute_to_hosts :
+                            - testsuite-remote-2.digium.internal
+                            - testsuite-remote-3.digium.internal
+                            - testsuite-remote-4.digium.internal
+                        matrix :
+                            - 'USER' 
+                            - '# from, expiry, to, refer-to'
+                            - 'testsuite-remote-2.digium.internal;120;testsuite-remote-4.digium.internal;testsuite-remote-3.digium.internal'
+                            - 'testsuite-remote-3.digium.internal;120;testsuite-remote-2.digium.internal;testsuite-remote-4.digium.internal'
+                            - 'testsuite-remote-4.digium.internal;120;testsuite-remote-3.digium.internal;testsuite-remote-2.digium.internal'
+            - sipp:
                 testsuite_remote_host : testsuite-remote-2.digium.internal
                 cmd :
                     - uas :
                         scenario_file : wait_for_call.xml
+                        index : 0
                         transport : udp
                         ipv4oripv6 : ipv4
-                        timeout : 10
+                        timeout : 120
             - sipp:
                 testsuite_remote_host : testsuite-remote-3.digium.internal
                 cmd :
                     - uas :
                         scenario_file : wait_for_call_do_hangup.xml
+                        index : 0
                         transport : udp
                         ipv4oripv6 : ipv4
-                        timeout : 10
+                        timeout : 120
             - sipp:
                 testsuite_remote_host : testsuite-remote-4.digium.internal
                 cmd :
                     - uac :
                         scenario_file : call_then_blind_transfer.xml
+                        index : 0
                         calls : 1
                         cps : 1
                         duration : 10
                         targethost : testsuite-remote-1.digium.internal
                         ipv4oripv6 : ipv4
                         transport : udp
-                        timeout : 10
+                        timeout : 120
             - wireshark :
                 run_on_test_failure : True
                 testsuite_remote_host : testsuite-remote-1.digium.internal
diff --git a/tests/sip/Stress_Maximum_Simultaneous_Calls/testcase.yaml b/tests/sip/Stress_Maximum_Simultaneous_Calls/testcase.yaml
deleted file mode 100644
index e69de29..0000000

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list