[asterisk-scf-commits] asterisk-scf/release/testsuite.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jul 25 14:14:14 CDT 2012


branch "master" has been updated
       via  f4a6b5462662fef5dcff75f0bb562e31b00ac91a (commit)
       via  c27d358145cd13e304c13232289cff9d459cb4bf (commit)
      from  ec74b4ebc6485b6ce7d9944d8e0bceefa3d12a58 (commit)

Summary of changes:
 Server.py                                          |   15 +++++++-
 configs/GlobalVars.py                              |    3 +-
 lib/python/ManualRun.py                            |   39 ++++++++++++++++++++
 .../sip/Functional_Simple_Endpoint/testcase.yaml   |    5 ++-
 tests/asteriskscf/sip/testing/testcase.yaml        |    8 ++--
 tests/asteriskscf/sip/tests.yaml                   |    8 +++-
 tests/asteriskscf/tests.yaml                       |    2 +-
 tests/build/asterisk_scf/testcase.yaml             |   37 +++++++++++--------
 tests/build/sip-router/testcase.yaml               |   29 +++++++++++++++
 tests/build/sipp/testcase.yaml                     |   26 +++++++++++++
 tests/build/tests.yaml                             |    5 ++-
 tests/build/testsuite/testcase.yaml                |   26 +++++++++++++
 tests/tests.yaml                                   |    4 +-
 testsuite_results.xml                              |   14 -------
 14 files changed, 176 insertions(+), 45 deletions(-)
 create mode 100755 lib/python/ManualRun.py
 create mode 100644 tests/build/sip-router/testcase.yaml
 create mode 100644 tests/build/sipp/testcase.yaml
 create mode 100644 tests/build/testsuite/testcase.yaml
 delete mode 100644 testsuite_results.xml


- Log -----------------------------------------------------------------
commit f4a6b5462662fef5dcff75f0bb562e31b00ac91a
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jul 25 14:14:04 2012 -0500

    Added support for manual test execution via Bamboo. This will allow anyone to run a specific test from bamboo vs. having to manually execute the test with the test-suite itself.

diff --git a/Server.py b/Server.py
index 3f95608..2e3b698 100755
--- a/Server.py
+++ b/Server.py
@@ -37,6 +37,7 @@ import Misc
 import Yaml
 import Plugin
 import JUnitXML
+import ManualRun
 import FileSystem
 #import Interactive
 
@@ -55,8 +56,9 @@ class TestSuiteServer(Misc.Utils, Plugin.Loader, RPC.BaseClass):
         if len(argv) >= 2:
             globalVars.mode = argv[1]
         else:
-            self.fatalError('A run mode (\'testing\' or \'docs\') must be specified as the first argument.')
+            self.fatalError("A run mode ('testing', 'manual, or 'docs') must be specified as the first argument.")
 
+	'''
         if len(argv) == 4:
             globalVars.bambooBuildKey = argv[2]
             globalVars.bambooBuildNum = argv[3]
@@ -64,10 +66,15 @@ class TestSuiteServer(Misc.Utils, Plugin.Loader, RPC.BaseClass):
         else:
             if len(argv) != 2:
                 print >> sys.stderr, ' NOTE: The Bamboo build key and build number are both\n       required to generate artifact link URLs.\n'
+	'''
 
-        if not globalVars.mode == 'testing' and not globalVars.mode == 'docs':
+        if not globalVars.mode == 'testing' and not globalVars.mode == 'docs' and not globalVars.mode == 'manual':
             self.fatalError('%s is an invalid mode.' % globalVars.mode)
 
+	if globalVars.mode == 'manual':
+		globalVars.manualRun = True
+		globalVars.mode = 'testing'
+
         res = self.readFile(globalVars.remoteAgentsListFile, yamlBool=True)
         if res['success'] == False:
             self.fatalError('Unable to load remote agent list!')
@@ -83,6 +90,9 @@ class TestSuiteServer(Misc.Utils, Plugin.Loader, RPC.BaseClass):
         if res['success'] == False:
             self.fatalError('Unable to load tests!\n\n %s' % res['msg'])
 
+	if globalVars.manualRun:
+            res = {'data':ManualRun.Parse(argv, res['data'])}
+
         self.main(res['data'])
 
         #if globalVars.mode == 'testing':
@@ -233,6 +243,7 @@ class TestSuiteServer(Misc.Utils, Plugin.Loader, RPC.BaseClass):
 
                                             if runResults['success'] == False and globalVars.testSuccess == True:
                                                 globalVars.testSuccess = False
+                                                print runResults
                                                 if 'remote' in runResults:
                                                     globalVars.testMsg = runResults['msg'] = "'%s' plugin on '%s': %s" % (plugin, runResults['remote'], runResults['msg'])
                                                 else:
diff --git a/configs/GlobalVars.py b/configs/GlobalVars.py
index 567d695..8811eef 100644
--- a/configs/GlobalVars.py
+++ b/configs/GlobalVars.py
@@ -50,7 +50,8 @@ class globalVars:
         interactive = {'qData':{}, 'menuData':{}}
         configFile = '!!CWD!!/configs/remote/remoteAgent.yaml'
 
-    elif pname == 'Server.py':
+    elif pname == 'Server.py' or pname == 'manualrun.py':
+	manualRun = False
         docs = []
         overrides = {}
 
diff --git a/lib/python/ManualRun.py b/lib/python/ManualRun.py
new file mode 100755
index 0000000..bd1d2c0
--- /dev/null
+++ b/lib/python/ManualRun.py
@@ -0,0 +1,39 @@
+import os
+import sys
+import time
+
+from GlobalVars import globalVars
+
+def Parse(args, yamlData):
+
+	try:
+            args[2]
+            args[3]
+	except:
+            print >> sys.stderr, "Not arguments required have been specified.\n"
+            return {}
+
+	tg_name = None
+	for test_group_idx, test_group in enumerate(yamlData):
+		for tg in test_group:
+			if tg == args[2]:
+				tg_name = args[2]
+				tg_data = yamlData[test_group_idx]
+				break
+
+	if not tg_data:
+		print >> sys.stderr, "No tests match the test group specified! %s\n" % args[1]
+		sys.exit(-1)
+
+	tc = None	
+	for test_case in tg_data[tg_name]['tests']:
+		if test_case['name'] == args[3]:
+			tc = test_case
+		
+	tg_data[tg_name]['tests'] = [tc]
+
+	if not tc:
+		print >> sys.stderr, "No tests match the test group specified! %s\n" % args[1]
+		sys.exit(-1)
+
+	return [yamlData[0], tg_data]
diff --git a/testsuite_results.xml b/testsuite_results.xml
deleted file mode 100644
index 9a9ffaa..0000000
--- a/testsuite_results.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" ?>
-<testsuites>
-  <testsuite name="build">
-    <testsuite name="asteriskscf_ubuntu_maverick_retry_deux">
-      <testcase name="slice_plugins" time="61.82975"/>
-      <testcase name="asterisk_scf" time="731.612123"/>
-    </testsuite>
-  </testsuite>
-  <testsuite name="shutdown">
-    <testsuite name="shutdown">
-      <testcase name="remotes" time="4.506266"/>
-    </testsuite>
-  </testsuite>
-</testsuites>

commit c27d358145cd13e304c13232289cff9d459cb4bf
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jul 25 14:07:37 2012 -0500

    Updated tests to reflect changes in the core.

diff --git a/tests/asteriskscf/sip/Functional_Simple_Endpoint/testcase.yaml b/tests/asteriskscf/sip/Functional_Simple_Endpoint/testcase.yaml
index 67fa40d..51a053f 100644
--- a/tests/asteriskscf/sip/Functional_Simple_Endpoint/testcase.yaml
+++ b/tests/asteriskscf/sip/Functional_Simple_Endpoint/testcase.yaml
@@ -22,15 +22,16 @@ tests :
                             - MediaServiceRTP
                             - BridgeManager
                             - RoutingService
-                            - SipService
+                            - SIPService
                         mode : standalone
             - asteriskscf_configurator :
+                remote_agent : [testsuite-remote-1.digium.internal, public1, ipv4] 
                 service_locator_host : [testsuite-remote-1.digium.internal, public1, ipv4]
                 configuration_wipe : False
                 cmd :
                     sip :
                         - listen_udp4 :
-                            type : transport_udp
+                            type : transport-udp
                             host : [testsuite-remote-1.digium.internal, public1, ipv4]
                             port : 5060
                             ipv4oripv6 : ipv4
diff --git a/tests/asteriskscf/sip/testing/testcase.yaml b/tests/asteriskscf/sip/testing/testcase.yaml
index 577de4c..a8e4644 100644
--- a/tests/asteriskscf/sip/testing/testcase.yaml
+++ b/tests/asteriskscf/sip/testing/testcase.yaml
@@ -26,19 +26,19 @@ tests :
                         mode : standalone
                         service_locator : [testsuite-remote-1.digium.internal, public1, ipv4]
             - asteriskscf_configurator :
-                service_locator_host : testsuite-remote-1.digium.internal
+                service_locator_host : [testsuite-remote-1.digium.internal, public1, ipv4]
                 configuration_wipe : False
                 cmd :
                     sip :
                         - listen_udp4 :
                             type : transport_udp
-                            host : testsuite-remote-1.digium.internal
+                            host : [testsuite-remote-1.digium.internal, public1, ipv4]
                             port : 5060
                         - service :
                             type : endpoint
                             #targethost : [testsuite-remote-2.digium.internal, public1, ipv4]
                             targetport : 5060
-                            sourcehost : testsuite-remote-1.digium.internal
+                            sourcehost : [testsuite-remote-1.digium.internal, public1, ipv4]
                             sourceport : 5060
                             direction : both
                             securetransport : none
@@ -48,7 +48,7 @@ tests :
                             type : endpoint
                             #targethost : [testsuite-remote-4.digium.internal, public1, ipv4]
                             targetport : 5060
-                            sourcehost : testsuite-remote-1.digium.internal
+                            sourcehost : [testsuite-remote-1.digium.internal, public1, ipv4]
                             sourceport : 5060
                             direction : both
                             securetransport : none
diff --git a/tests/asteriskscf/sip/tests.yaml b/tests/asteriskscf/sip/tests.yaml
index 88c3717..fc026b5 100644
--- a/tests/asteriskscf/sip/tests.yaml
+++ b/tests/asteriskscf/sip/tests.yaml
@@ -5,7 +5,12 @@ docs :
     template : generic
     overview : 'SIP overview goes here'
 testcase :
-    - Functional_Simple_Endpoint
+#    - Functional_Simple_Endpoint
+#    - Functional_Registrar_Simple
+    - Functional_Registrar_Simple_Failover
+
+
+
 #    - Functional_Busy_Endpoint
 #    - Functional_Timeout_Endpoint
 #    - Functional_Congestion_Endpoint
@@ -13,7 +18,6 @@ testcase :
 #    - Functional_Blind_Transfer
 #    - Functional_Attended_Transfer
 
-#    - Functional_Registrar_Simple
 #    - Functional_Registrar_Verify_Username_Enumeration
 
 #    - Functional_Simple_Endpoint_Distributed
diff --git a/tests/asteriskscf/tests.yaml b/tests/asteriskscf/tests.yaml
index 2bcda5e..0bfb305 100644
--- a/tests/asteriskscf/tests.yaml
+++ b/tests/asteriskscf/tests.yaml
@@ -1,6 +1,6 @@
 tests :
-    - failover
     - sip
+#    - failover
 #    - service_locator
 #    - bridge
 #    - routing
diff --git a/tests/build/asterisk_scf/testcase.yaml b/tests/build/asterisk_scf/testcase.yaml
index 8290818..9187a52 100644
--- a/tests/build/asterisk_scf/testcase.yaml
+++ b/tests/build/asterisk_scf/testcase.yaml
@@ -2,7 +2,7 @@ name : asteriskscf_ubuntu_maverick
 options :
     stop_tests_on_failure : True
 tests :
-    - ice_cpp :
+    - ice :
         timeline :
             - build :
                 remote_agent : [galway.digium.internal, public1, ipv4]
@@ -10,22 +10,29 @@ tests :
                     pull_update : False
                     dl_type : git
                     dl_url : 'git://git.asterisk.org/asterisk-scf/release/ice'
-                    cd : ice/cpp
+                    cd : ice
                     make_cmd :
+                        - cd ice/cpp
                         - make -j8
                         - make install
-    - ice_python :
-        timeline :
-            - build :
-                remote_agent : [galway.digium.internal, public1, ipv4]
-                cmd :
-                    pull_update : True
-                    dl_type : git
-                    dl_url : 'git://git.asterisk.org/asterisk-scf/release/ice'
-                    cd : ice/py
-                    make_cmd :
-                        - make
+                        - cd ice/py
+                        - make 
                         - make install
+#    - ice_python :
+#        timeline :
+#            - build :
+#
+#                remote_agent : [galway.digium.internal, public1, ipv4]
+#
+#                cmd :
+#
+#                    pull_update : True
+#                    dl_type : git
+#                    dl_url : 'git://git.asterisk.org/asterisk-scf/release/ice'
+#                    cd : ice/py
+#                    make_cmd :
+#                        - make
+#                        - make install
     - slice_plugins :
         timeline:
             - build :
@@ -64,9 +71,7 @@ tests :
                         - ./gitall-asterisk-scf.sh
                         #- rm -rf build
                         - cmake/init-cmake.sh
-                        - cd gitall/build
-                        - make -j8
-                        #- cmake --build ./build
+                        - cmake --build ./build
                     redistribute :
                         remotes :
                             - testsuite-remote-1.digium.internal
diff --git a/tests/build/sip-router/testcase.yaml b/tests/build/sip-router/testcase.yaml
new file mode 100644
index 0000000..8cf64bc
--- /dev/null
+++ b/tests/build/sip-router/testcase.yaml
@@ -0,0 +1,29 @@
+name : sip-router
+options :
+    stop_tests_on_failure : True
+tests :
+    - kamailio :
+        timeline:
+            - build :
+                remote_agent : [galway.digium.internal, public1, ipv4]
+                cmd :
+                    pull_update : False
+                    dl_type : git
+                    dl_url : 'git://git.sip-router.org/sip-router'
+                    git_dir : kamailio
+                    git_depth : 1
+                    cd : kamailio
+                    make_cmd :
+                        - git checkout -b 3.2 origin/3.2
+                        - make FLAVOUR=kamailio -j8
+                    redistribute :
+                        remotes :
+                            - testsuite-remote-1.digium.internal
+                            - testsuite-remote-2.digium.internal
+                            - testsuite-remote-3.digium.internal
+                            - testsuite-remote-4.digium.internal
+                            - testsuite-remote-5.digium.internal
+                            - testsuite-remote-6.digium.internal
+                            - testsuite-remote-10.digium.internal
+                        send_dir : '!!TMP!!/kamailio'
+                        install_dir : '!!TMP!!'
diff --git a/tests/build/sipp/testcase.yaml b/tests/build/sipp/testcase.yaml
new file mode 100644
index 0000000..60c0a99
--- /dev/null
+++ b/tests/build/sipp/testcase.yaml
@@ -0,0 +1,26 @@
+name : SIPp
+options :
+    stop_tests_on_failure : True
+tests :
+    - SIPp :
+        timeline :
+            - build :
+                remote_agent : [galway.digium.internal, public1, ipv4]
+                cmd :
+                    pull_update : True
+                    dl_type : svn
+                    dl_url : 'https://sipp.svn.sourceforge.net/svnroot/sipp'
+                    cd : sipp/sipp/trunk
+                    make_cmd :
+                        - make -j8
+                    redistribute :
+                        remotes :
+                            - testsuite-remote-1.digium.internal
+                            - testsuite-remote-2.digium.internal
+                            - testsuite-remote-3.digium.internal
+                            - testsuite-remote-4.digium.internal
+                            - testsuite-remote-5.digium.internal
+                            - testsuite-remote-6.digium.internal
+                            - testsuite-remote-10.digium.internal
+                        send_dir : sipp/sipp
+                        install_dir : '!!TMP!!'
diff --git a/tests/build/tests.yaml b/tests/build/tests.yaml
index 410069e..00f7c08 100644
--- a/tests/build/tests.yaml
+++ b/tests/build/tests.yaml
@@ -1,2 +1,5 @@
 testcase :
-    - asterisk_scf
+#    - testsuite
+#    - sipp
+#    - asterisk_scf
+    - sip-router
diff --git a/tests/build/testsuite/testcase.yaml b/tests/build/testsuite/testcase.yaml
new file mode 100644
index 0000000..f9f5423
--- /dev/null
+++ b/tests/build/testsuite/testcase.yaml
@@ -0,0 +1,26 @@
+name : testsuite
+options :
+    stop_tests_on_failure : True
+tests :
+    - build :
+        timeline:
+            - build :
+                remote_agent : [galway.digium.internal, public1, ipv4]
+                cmd :
+                    pull_update : False
+                    dl_type : git
+                    dl_url : 'git://git.asterisk.org/asterisk-scf/release/testsuite'
+                    cd : gitall
+                    make_cmd :
+                        - make install
+                    redistribute :
+                        remotes :
+                            - testsuite-remote-1.digium.internal
+                            - testsuite-remote-2.digium.internal
+                            - testsuite-remote-3.digium.internal
+                            - testsuite-remote-4.digium.internal
+                            - testsuite-remote-5.digium.internal
+                            - testsuite-remote-6.digium.internal
+                            - testsuite-remote-10.digium.internal
+                        send_dir : '!!TMP!!/testsuite'
+                        install_dir : '!!TMP!!'
diff --git a/tests/tests.yaml b/tests/tests.yaml
index e350502..1b960ff 100644
--- a/tests/tests.yaml
+++ b/tests/tests.yaml
@@ -1,4 +1,4 @@
-tests :
-   - build
+#tests :
+#   - build
 dir :
     - asteriskscf

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


-- 
asterisk-scf/release/testsuite.git



More information about the asterisk-scf-commits mailing list