[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
Mon Jun 27 15:41:02 CDT 2011


branch "review" has been updated
       via  0f8d3467d7c249955a7c94f96fe079a38f0d407d (commit)
       via  22865dcba1228de991c28ea9c16e5a8ac77faa52 (commit)
       via  8c414eb8027cdd8ec091c47547339dca6e468308 (commit)
       via  6e3213b18b0711d67b58236ea74791614bb4f325 (commit)
      from  c071b6b486e031de1fe7f479dd9e11d1cd442245 (commit)

Summary of changes:
 lib/python/TestSuite.py   |   59 ++++++++---
 lib/python/confluence.py  |  107 +++++++++++++++++++
 lib/python/file.py        |   37 +++++++
 lib/python/plugins.py     |   64 ++++++++++++
 lib/python/xml.py         |   47 +++++++++
 lib/python/yaml_parser.py |   13 ++-
 testsuite.py              |  253 ++++++++++++++++++++-------------------------
 7 files changed, 422 insertions(+), 158 deletions(-)
 create mode 100644 lib/python/confluence.py
 create mode 100644 lib/python/file.py
 create mode 100644 lib/python/plugins.py
 create mode 100644 lib/python/xml.py


- Log -----------------------------------------------------------------
commit 0f8d3467d7c249955a7c94f96fe079a38f0d407d
Author: Darren Sessions <dsessions at digium.com>
Date:   Mon Jun 27 15:40:48 2011 -0500

    Finished up the wikibot integration with the testsuite. Additionally, moved several of the support classes that were previously within the testsuite server script into lib files.

diff --git a/lib/python/TestSuite.py b/lib/python/TestSuite.py
index 0e7536a..aa84a76 100644
--- a/lib/python/TestSuite.py
+++ b/lib/python/TestSuite.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 '''
 
  Test-Suite Support Classes
diff --git a/lib/python/confluence.py b/lib/python/confluence.py
new file mode 100644
index 0000000..d04cf7c
--- /dev/null
+++ b/lib/python/confluence.py
@@ -0,0 +1,107 @@
+'''
+
+ Confluence Support Class
+
+ Asterisk SCF Test-Suite
+ Copyright (C) 2011, Digium, Inc.
+
+ This program is free software, distributed under the terms of
+ the GNU General Public License Version 2.
+
+'''
+
+import re
+import sys
+import file
+import time
+import datetime
+import xmlrpclib
+
+class process:
+    def __init__(self, title, space, parentPage, pageContents, lastModDates):
+        self.connect()
+        self.checkPage(title, space, parentPage, pageContents, lastModDates)
+
+    def connect(self):
+        results = file.file().read('/etc/testsuite_wiki_auth.conf')
+        if results['success'] == False:
+            self.error('Fatal! Unable to open the test-suite wiki authorization config file. (/etc/testsuite_wiki_auth.conf)')
+            sys.exit(1)
+
+        (username, password, server) = results['fd'].split('|')
+
+        if server == '' or re.search(r'xmlrpc', server) is None:
+            self.error('Please specify a valid Confluence XML RPC URL.')
+
+        self.xmlrpc = xmlrpclib.Server(server)
+
+        try:
+            self.token = self.xmlrpc.confluence1.login(username, password)
+        except:
+            self.error('Could not login to the Confluence XML RPC!\n %s: %s' % (server, sys.exc_info()[1]))
+
+    def checkPage(self, title, space, parentPage, pageContents, lastModDates):
+        try:
+            parentPage = self.xmlrpc.confluence1.getPage(
+                self.token,
+                space,
+                parentPage
+            )
+        except:
+            self.error("The parent page specified for the '%s' test page, '%s', either does\n" % (title, parentPage) + \
+                 " not exist or this account does not have permissions to access it.")
+
+        parentPageId = parentPage['id']
+
+        try:
+            pageCheck = self.xmlrpc.confluence1.getPage(
+                self.token,
+                space,
+                title
+            )
+        except:
+            print >> sys.stderr, "\n Attempting to create the '%s' page." % title
+            self.createPage(title, space, parentPage, parentPageId, pageContents)
+        else:
+            print >> sys.stderr, "\n Attempting to update the '%s' page." % title
+            self.updatePage(title, space, parentPage, parentPageId, pageContents, lastModDates)
+
+        print ' Done!\n\n'
+
+    def updatePage(self, title, space, parentPage, parentPageId, pageContents, lastModDates):
+        oldVersion = self.xmlrpc.confluence1.getPage(
+            self.token,
+            space,
+            title
+        )
+
+        newVersion = oldVersion
+
+        epoch = str(oldVersion['modified'])
+        epoch = datetime.datetime(int(epoch[0:4]), int(epoch[4:6]), int(epoch[6:8]), int(epoch[9:11]), int(epoch[12:14]), int(epoch[15:17]))
+        epoch = time.mktime(epoch.timetuple())
+
+        forceUpdate = False
+        for fileDates in lastModDates:
+            if float(fileDates) > float(epoch):
+                forceUpdate = True
+    
+        newVersion['content'] = pageContents
+        newVersion['title'] = title
+        newVersion['parentId'] = parentPageId
+
+        if newVersion != oldVersion or forceUpdate == True:
+            self.xmlrpc.confluence1.updatePage(self.token, newVersion, { 'minorEdit': True })
+    
+    def createPage(self, title, space, parentPage, parentPageId, pageContents):
+        page = {}
+        page['space'] = space
+        page['content'] = pageContents
+        page['title'] = title
+        page['parentId'] = parentPageId
+        page = self.xmlrpc.confluence1.storePage(self.token, page)
+
+    def error(self, msg):
+        print >> sys.stderr, '\n %s\n' % msg
+        sys.exit(1)
+
diff --git a/lib/python/file.py b/lib/python/file.py
new file mode 100644
index 0000000..c51e5f6
--- /dev/null
+++ b/lib/python/file.py
@@ -0,0 +1,37 @@
+'''
+
+ Test-Suite Plugin Support Class
+
+ Asterisk SCF Test-Suite
+ Copyright (C) 2011, Digium, Inc.
+
+ This program is free software, distributed under the terms of
+ the GNU General Public License Version 2.
+
+'''
+
+import sys
+
+class file:
+    def write(self, fn, fd):
+        try:
+            f = open('%s/%s' % (cwd, fn), 'w')
+        except IOError:
+            return {'success':False, 'msg':'Failed to open test results output file: %s/%s' % (cwd, fn)}
+        except:
+            return {'success':False, 'msg':'Unexpected error: %s' % sys.exc_info()[0]}
+        f.write(fd)
+        f.close()
+        return {'success':True}
+
+    def read(self, fn):
+        try:
+            f = open('%s' % fn, 'r')
+        except IOError:
+            return {'success':False, 'msg':'Failed to open file for reading: %s' % cwd}
+        except:
+            return {'success':False, 'msg':'Unexpected error: %s' % sys.exc_info()[0]}
+        else:
+            fc = f.read()
+            f.close()
+        return {'success':True, 'fd':fc.strip()}
diff --git a/lib/python/plugins.py b/lib/python/plugins.py
new file mode 100644
index 0000000..5017c09
--- /dev/null
+++ b/lib/python/plugins.py
@@ -0,0 +1,64 @@
+'''
+
+ Test-Suite Plugin Support Class
+
+ Asterisk SCF Test-Suite
+ Copyright (C) 2011, Digium, Inc.
+
+ This program is free software, distributed under the terms of
+ the GNU General Public License Version 2.
+
+'''
+
+import imp
+import sys
+import inspect
+
+class plugins:
+    def execute(self, name, module, testData, testPath, globalVars):
+        try:
+            func = getattr(module, 'plugin')
+        except AttributeError:
+            return {'success':False,'msg':"Unable to execute module '%s'. %s" % (name, sys.exc_info()[1])}
+        else:
+            results = func().run(testData, testPath, globalVars)
+        if not type(results) == dict:
+            return {'success':False,'msg':"The '%s' module return invalid or missing data." % name}
+        return results
+
+    def init(self, name):
+        loadResults = self.load(name)
+        if not loadResults['success'] == True:
+            return loadResults
+        checkResults = self.check(name, loadResults['module'])
+        if not checkResults['success'] == True:
+            return checkResults
+        return loadResults
+
+    def load(self, name):
+        try:
+            return {'success':True,'module':sys.modules[name]}
+        except KeyError:
+            pass
+        try:
+            fp, pathName, desc = imp.find_module(name)
+        except ImportError:
+            return {'success':False,'msg':'%s' % sys.exc_info()[1]}
+        try:
+            return {'success':True,'module':imp.load_module(name, fp, pathName, desc)}
+        finally:
+            if fp:
+                fp.close()
+
+    def check(self, name, module):
+        try:
+            inspect.ismethod(module.plugin().main)
+        except AttributeError:
+            return {'success':False,'msg':'The required "main" method in the "plugin" class is not implemented in the "%s" plugin.' % name}
+        except:
+            return {'success':False,'msg':'The "main" method in the "plugin" class in "%s" is not responding properly. %s.' % (name, sys.exc_info())}
+        argCheck = inspect.getargspec(module.plugin().main)
+        if argCheck[0] != ['self','testData', 'testPath', 'globalVars'] and argCheck[0] != ['self','testData', 'testPath', 'globalVars', 'remote']:
+            return {'success':False,'msg':"The 'main' method in the 'plugin' class within '%s' has improperly labeled args! i.e. def main(self, testData, testPath, globalVars)." % name}
+        return {'success':True}
+
diff --git a/lib/python/xml.py b/lib/python/xml.py
new file mode 100644
index 0000000..3fd3958
--- /dev/null
+++ b/lib/python/xml.py
@@ -0,0 +1,47 @@
+'''
+
+ XML Support Class
+
+ Asterisk SCF Test-Suite
+ Copyright (C) 2011, Digium, Inc.
+
+ This program is free software, distributed under the terms of
+ the GNU General Public License Version 2.
+
+'''
+
+from xml.dom import minidom
+from xml.etree.ElementTree import Element, SubElement, tostring
+
+class xml:
+    def initTestSuite(self):
+        return Element('testsuites')
+
+    def prettyXml(self, x):
+        rough_string = tostring(x, 'utf-8')
+        reparsed = minidom.parseString(rough_string)
+        return reparsed.toprettyxml(indent="  ")
+
+    def convToString(self, x):
+        return tostring(x)
+
+    def addTestType(self, element, name, type):
+        subElement = SubElement(element, type)
+        subElement.set('name', name)
+        return element, subElement
+
+    def addTestSuite(self, element, name):
+        return self.addTestType(element, name, 'testsuite')
+
+    def addTestCase(self, element, name):
+        return self.addTestType(element, name, 'testcase')
+
+    def addFailure(self, element, msgs):
+        subElement = SubElement(element, 'failure')
+        subElement.text = unicode(' '.join(msgs))
+        return element, []
+
+    def setProperty(self, element, key, val):
+        element.set(key, '%s' % val)
+        return element
+
diff --git a/lib/python/yaml_parser.py b/lib/python/yaml_parser.py
index 0035e8f..c407988 100755
--- a/lib/python/yaml_parser.py
+++ b/lib/python/yaml_parser.py
@@ -1,13 +1,14 @@
 #!/usr/bin/python
 
+import os
 import sys
+import time
 import yaml
 
 class yamlBase:
     def __init__(self):
         self.testDir = 'tests'
         self.testsYaml = 'tests.yaml'
-        self.testDocYaml = 'testdoc.yaml'
         self.testCaseYaml = 'testcase.yaml'
         self.returnData = []
         self.indResults = {}
@@ -20,15 +21,19 @@ class yamlBase:
                 path = "%s/%s" % (searchPath, items)
                 if list == 'tests':
                     self.indResults = {}
-                    self.indResults[items] = []
+                    self.indResults[items] = {'tests':[], 'docs':{}, 'lastModDates':[]}
                     self.parse(path, yamlFile, items)
                     self.returnData.append(self.indResults)
                 elif list == 'dir':
                     self.parse(path, yamlFile, test)
+                elif list == 'docs':
+                    self.indResults[test]['docs'] = testData['docs']
                 elif list == 'testcase':
                     results = self.loadFiles(path, yamlFile)
+                    if 'docs' in results:
+                        self.indResults[test]['lastModDates'].append("%s" % os.path.getmtime("%s/%s" % (path, yamlFile)))
                     results['path'] = path
-                    self.indResults[test].append(results)
+                    self.indResults[test]['tests'].append(results)
 
     def loadFiles(self, path, yaml_file):
         f = open("%s/%s" % (path, yaml_file), "r")
@@ -63,4 +68,4 @@ class testcases(yamlBase):
 
 class docs(yamlBase):
     def load(self):
-        self.parse(self.testDir, self.testDocYaml)
+        self.parse(self.testDir, self.testCaseYaml)
diff --git a/testsuite.py b/testsuite.py
index de9e871..a421359 100755
--- a/testsuite.py
+++ b/testsuite.py
@@ -11,20 +11,13 @@
 '''
 
 import os
-import re
-import imp
 import sys
 import shutil
 import signal
-import inspect
 import datetime
 import platform
 import textwrap
 import xmlrpclib
-from xml.dom import minidom
-from xml.etree.ElementTree import Element, SubElement, tostring
-
-import dumper
 
 cwd = os.path.dirname(os.path.realpath(__file__))
 hostname = platform.node()
@@ -32,6 +25,10 @@ hostname = platform.node()
 sys.path.append("%s/lib/python" % cwd)
 sys.path.append("%s/plugins" % cwd)
 
+import xml
+import file
+import plugins
+import confluence
 import yaml_parser
 
 class __main__:
@@ -141,7 +138,7 @@ class __main__:
 
                                 ''' import plugins '''
                                 for plugin in [plugin for timeLine in subTestCase[testName]['timeline'] for plugin in timeLine]:
-                                    pluginData[plugin] = plugins().init(plugin)
+                                    pluginData[plugin] = plugins.plugins().init(plugin)
                                     if not pluginData[plugin]['success'] == True:
                                         errorMsgs.append(pluginData[plugin]['msg'])
                                         success = False
@@ -155,7 +152,7 @@ class __main__:
                                 for timeLine in subTestCase[testName]['timeline']:
                                     for plugin in timeLine:
                                         self.globalVars['testInfo']['testPlugin'] = plugin
-                                        runResults = plugins().execute(plugin, pluginData[plugin]['module'], timeLine[plugin], testData['path'], self.globalVars)
+                                        runResults = plugins.plugins().execute(plugin, pluginData[plugin]['module'], timeLine[plugin], testData['path'], self.globalVars)
                                         if self.globalVars['mode'] == 'testing': 
                                             if not 'shutdownList' in runResults:
                                                 if not 'shutdownExempt' in runResults:
@@ -208,7 +205,7 @@ class __main__:
                         break
 
                 if self.globalVars['mode'] == 'docs':
-                    results = file().read('docs/%s_page_template.confluence' % list[testCategory]['docs']['template'])
+                    results = file.file().read('%s/docs/%s_page_template.confluence' % (cwd, list[testCategory]['docs']['template']))
                     if results['success'] == False:
                         print >> sys.stderr, "Fatal! Unable to open the '%s' page template." % list[testCategory]['docs']['template']
                         sys.exit(1)
@@ -222,7 +219,7 @@ class __main__:
                         testType = {'functional':[], 'performance':[], 'stress':[]}
 
                         for docTestCase in docsPluginData[docCategory]:
-                            results = file().read('docs/%s_test_template.confluence' % docsPluginData[docCategory][docTestCase]['testData']['template'])
+                            results = file.file().read('%s/docs/%s_test_template.confluence' % (cwd, docsPluginData[docCategory][docTestCase]['testData']['template']))
                             if results['success'] == False:
                                 print >> sys.stderr, "Fatal! Unable to open the '%s' test template." % list[testCategory]['docs']['template']
                                 sys.exit(1)
@@ -267,7 +264,8 @@ class __main__:
                     pageTemplate = pageTemplate.replace('!!FUNCTIONALTESTS!!', '{br}'.join(testType['functional']))
                     pageTemplate = pageTemplate.replace('!!PERFORMANCETESTS!!', '{br}'.join(testType['performance']))
                     pageTemplate = pageTemplate.replace('!!STRESSTESTS!!', '{br}'.join(testType['stress']))
-                    print pageTemplate
+
+                    confluence.process(list[testCategory]['docs']['title'], list[testCategory]['docs']['space'], list[testCategory]['docs']['parentPage'], pageTemplate, list[testCategory]['lastModDates'])
 
         if self.globalVars['mode'] == 'testing':
             print >> sys.stderr, "\n\n" + xml().prettyXml(x)
@@ -296,110 +294,6 @@ class __main__:
                     #args = args.replace('!!TMP!!/', './')
                     #args = args.replace('/tmp/', './')
                     #print args
-        
-class plugins:
-    def execute(self, name, module, testData, testPath, globalVars):
-        try:
-            func = getattr(module, 'plugin')
-        except AttributeError:
-            return {'success':False,'msg':"Unable to execute module '%s'. %s" % (name, sys.exc_info()[1])}
-        else:
-            results = func().run(testData, testPath, globalVars)
-        if not type(results) == dict:
-            return {'success':False,'msg':"The '%s' module return invalid or missing data." % name}
-        return results
-
-    def init(self, name):
-        loadResults = self.load(name)
-        if not loadResults['success'] == True:
-            return loadResults
-        checkResults = self.check(name, loadResults['module'])
-        if not checkResults['success'] == True:
-            return checkResults
-        return loadResults
-
-    def load(self, name):
-        try:
-            return {'success':True,'module':sys.modules[name]}
-        except KeyError:
-            pass
-        try:
-            fp, pathName, desc = imp.find_module(name)
-        except ImportError:
-            return {'success':False,'msg':'%s' % sys.exc_info()[1]}
-        try:
-            return {'success':True,'module':imp.load_module(name, fp, pathName, desc)}
-        finally:
-            if fp:
-                fp.close()
-
-    def check(self, name, module):
-        try:
-            inspect.ismethod(module.plugin().main)
-        except AttributeError:
-            return {'success':False,'msg':'The required "main" method in the "plugin" class is not implemented in the "%s" plugin.' % name}
-        except:
-            return {'success':False,'msg':'The "main" method in the "plugin" class in "%s" is not responding properly. %s.' % (name, sys.exc_info())}
-        argCheck = inspect.getargspec(module.plugin().main)
-        if argCheck[0] != ['self','testData', 'testPath', 'globalVars'] and argCheck[0] != ['self','testData', 'testPath', 'globalVars', 'remote']:
-            return {'success':False,'msg':"The 'main' method in the 'plugin' class within '%s' has improperly labeled args! i.e. def main(self, testData, testPath, globalVars)." % name}
-        return {'success':True}
-
-class xml:
-    def initTestSuite(self):
-        return Element('testsuites')
-
-    def prettyXml(self, x):
-        rough_string = tostring(x, 'utf-8')
-        reparsed = minidom.parseString(rough_string)
-        return reparsed.toprettyxml(indent="  ")
-
-    def convToString(self, x):
-        return tostring(x)
-
-    def addTestType(self, element, name, type):
-        subElement = SubElement(element, type)
-        subElement.set('name', name)
-        return element, subElement
-
-    def addTestSuite(self, element, name):
-        return self.addTestType(element, name, 'testsuite')
-
-    def addTestCase(self, element, name):
-        return self.addTestType(element, name, 'testcase')
-
-    def addFailure(self, element, msgs):
-        subElement = SubElement(element, 'failure')
-        subElement.text = unicode(' '.join(msgs))
-        return element, []
-
-    def setProperty(self, element, key, val):
-        element.set(key, '%s' % val)
-        return element
-
-class file:
-    def write(self, fn, fd):
-        try:
-            f = open('%s/%s' % (cwd, fn), 'w')
-        except IOError:
-            return {'success':False, 'msg':'Failed to open test results output file: %s/%s' % (cwd, fn)}
-        except:
-            return {'success':False, 'msg':'Unexpected error: %s' % sys.exc_info()[0]}
-        f.write(fd)
-        f.close()
-        return {'success':True}
-
-    def read(self, fn):
-        try:
-            f = open('%s/%s' % (cwd, fn), 'r')
-        except IOError:
-            return {'success':False, 'msg':'Failed to open file for reading: %s/%s' % (cwd, fn)}
-        except:
-            return {'success':False, 'msg':'Unexpected error: %s' % sys.exc_info()[0]}
-        else:
-            fc = f.read()
-            f.close()
-        return {'success':True, 'fd':fc.strip()}
 
 class cleanup:
     def __init__(self):

commit 22865dcba1228de991c28ea9c16e5a8ac77faa52
Author: Darren Sessions <dsessions at digium.com>
Date:   Mon Jun 27 12:19:42 2011 -0500

    finished up the page creation code. just need to finish implementing the confluence api code and then it will be complete.

diff --git a/testsuite.py b/testsuite.py
index 1942139..de9e871 100755
--- a/testsuite.py
+++ b/testsuite.py
@@ -19,10 +19,13 @@ import signal
 import inspect
 import datetime
 import platform
+import textwrap
 import xmlrpclib
 from xml.dom import minidom
 from xml.etree.ElementTree import Element, SubElement, tostring
 
+import dumper
+
 cwd = os.path.dirname(os.path.realpath(__file__))
 hostname = platform.node()
 
@@ -88,7 +91,10 @@ class __main__:
                 if self.globalVars['mode'] == 'testing':
                     x, categoryElement = xml().addTestSuite(x, testCategory)
                     print >> sys.stderr, "\n Starting '%s' Tests . . \n --------------------------------------------------------" % testCategory
-                for testData in list[testCategory]:
+                else:
+                    print >> sys.stderr, "\n Creating the '%s' wiki page . .\n --------------------------------------------------------" % testCategory
+            
+                for testData in list[testCategory]['tests']:
                     if self.globalVars['mode'] == 'testing':
                         categoryElement, testElement = xml().addTestSuite(categoryElement, testData['name'])
                         print >> sys.stderr, ' |- Testcase: %s ' % testData['name']
@@ -96,11 +102,12 @@ class __main__:
                         testData['options'] = {}
                     if self.globalVars['mode'] == 'docs':
                         if not 'docs' in testData:
-                            print >> sys.stderr, 'No documentation found for testcase: %s' % testData['name']
+                            print >> sys.stderr, ' No documentation found for testcase: %s' % testData['name']
                             break
                         else:
-                            print >> sys.stderr, 'Loading documentation for testcase: %s' % testData['name']
-                        #print testData['docs']
+                            print >> sys.stderr, ' Loading documentation for testcase: %s' % testData['name']
+
+                        docsPluginData = {testCategory:{testData['name']:{'testData':testData['docs'],'tests':{}}}}
 
                     for subTestCase in testData['tests']:
                         timerStart = datetime.datetime.now()
@@ -109,8 +116,8 @@ class __main__:
                         for testName in subTestCase:
                             ''' TEMP CODE TO MAKE SINGLE TEST FOR DOC PROCESSOR '''
                             ''' TEMP CODE TO MAKE SINGLE TEST FOR DOC PROCESSOR '''
-                            if not testData['docs']['list_test'] == testName:
-                                break
+                            #if not testData['docs']['list_test'] == testName:
+                            #    break
                             ''' TEMP CODE TO MAKE SINGLE TEST FOR DOC PROCESSOR '''
                             ''' TEMP CODE TO MAKE SINGLE TEST FOR DOC PROCESSOR '''
                             self.globalVars['testSuccess'] = True
@@ -120,7 +127,7 @@ class __main__:
                             self.globalVars['testInfo']['testName'] = testName
                             self.globalVars['testInfo']['testPath'] = "%s/%s/%s" % (testCategory, testData['name'], testName)
                             self.globalVars['testInfo']['testOpts'] = testData['options'] 
-                            docs = {testCategory:{testData['name']:{testName:{'pluginData':[], 'testData':{}}}}}
+                            docsPluginData[testCategory][testData['name']]['tests'][testName] = {'pluginData':[]}
 
                             if self.globalVars['mode'] == 'testing':
                                 testElement, subTestElement = xml().addTestCase(testElement, testName)
@@ -162,7 +169,7 @@ class __main__:
                                                 self.globalVars['testMsg'] = runResults['msg'] = "'%s' plugin: %s" % (plugin, runResults['msg'])
                                                 break
                                         if runResults['success'] == 'docs':
-                                            docs[testCategory][testData['name']][testName]['pluginData'].append({'pluginName':plugin,'results':runResults['docs']})
+                                            docsPluginData[testCategory][testData['name']]['tests'][testName]['pluginData'].append({'pluginName':plugin,'results':runResults['docs']})
                             
                                 if self.globalVars['mode'] == 'testing':            
                                     ''' get timer delta '''
@@ -192,8 +199,6 @@ class __main__:
                 
                                     print >> sys.stderr, '   |- ' + testName + ' - PASSED! - %s.%s seconds' % (timerDelta.seconds, timerDelta.microseconds)
                                     subTestElement = xml().setProperty(subTestElement, 'time', '%s.%s' % (timerDelta.seconds, timerDelta.microseconds))
-                                elif self.globalVars['mode'] == 'docs':
-                                    documentation().processor(docs)
                             else:
                                 print >> sys.stderr, '   |- ' + testName + ' - FAILED!\n    \- No test data defined!'
                                 subTestElement, errorMsgs = xml().addFailure(subTestElement, ['No test data defined!'])
@@ -202,6 +207,68 @@ class __main__:
                     if stopTests == True:
                         break
 
+                if self.globalVars['mode'] == 'docs':
+                    results = file().read('docs/%s_page_template.confluence' % list[testCategory]['docs']['template'])
+                    if results['success'] == False:
+                        print >> sys.stderr, "Fatal! Unable to open the '%s' page template." % list[testCategory]['docs']['template']
+                        sys.exit(1)
+
+                    pageTemplate = results['fd']
+                    pageTemplate = pageTemplate.replace('!!OVERVIEW!!', list[testCategory]['docs']['overview'])
+
+                    checkEnvVar = {}
+                    for docCategory in docsPluginData:
+
+                        testType = {'functional':[], 'performance':[], 'stress':[]}
+
+                        for docTestCase in docsPluginData[docCategory]:
+                            results = file().read('docs/%s_test_template.confluence' % docsPluginData[docCategory][docTestCase]['testData']['template'])
+                            if results['success'] == False:
+                                print >> sys.stderr, "Fatal! Unable to open the '%s' test template." % list[testCategory]['docs']['template']
+                                sys.exit(1)
+
+                            testTemplate = results['fd']
+                            testTemplate = testTemplate.replace('!!TITLE!!', docTestCase)
+                            testTemplate = testTemplate.replace('!!SUMMARY!!', docsPluginData[docCategory][docTestCase]['testData']['summary'])
+                            testTemplate = testTemplate.replace('!!DESCRIPTION!!', docsPluginData[docCategory][docTestCase]['testData']['description'])
+                            testTemplate = testTemplate.replace('!!COMPONENTS!!', docsPluginData[docCategory][docTestCase]['testData']['components']) 
+                            testTemplate = testTemplate.replace('!!REQUIREMENTS!!', docsPluginData[docCategory][docTestCase]['testData']['requirements'])
+                            
+                            docTests = []
+                            for docTestName in docsPluginData[docCategory][docTestCase]['tests']:
+                                tests = []
+                                tests.append('{info:title=%s sub-test}{info}' % docTestName)
+                                for data in docsPluginData[docCategory][docTestCase]['tests'][docTestName]['pluginData']:
+                                    data['pluginName'] = data['pluginName'].capitalize()
+                                    data['pluginName'] = data['pluginName'].replace('_', ' ')
+                                    data['pluginName'] = data['pluginName'].replace('Asteriskscf', 'Asterisk SCF -')
+                                    data['pluginName'] = data['pluginName'].replace('icebox', 'IceBox')
+                                    data['pluginName'] = data['pluginName'].replace('Sipp', 'SIPp')
+                                    tests.append('{code:title=%s|borderStyle=solid}' % data['pluginName'])
+                                    for rpc in data['results']:
+                                        if rpc['cmd'] == 'run' or rpc['cmd'] == 'setEnvVar':
+                                            if rpc['cmd'] == 'run':
+                                                tests.append('\n'.join(textwrap.wrap(' '.join(rpc['args'][4]), 115)))
+                                            elif rpc['cmd'] == 'setEnvVar':
+                                                if rpc['args'][0] in checkEnvVar:
+                                                    if checkEnvVar[rpc['args'][0]] == rpc['args'][1]:
+                                                        continue
+                                                    checkEnvVar[rpc['args'][0]] = rpc['args'][1]
+                                                    if rpc['args'][0] == 'libpath':
+                                                        tests.append('export LD_LIBRARY_PATH=%s' % rpc['args'][1])
+                                    tests.append('{code}')
+                                tests.append('{br}')
+                                docTests.append('\n'.join(tests))
+
+                            testTemplate = testTemplate.replace('!!TESTPROCEDURES!!', '\n'.join(docTests))
+
+                            testType[docsPluginData[docCategory][docTestCase]['testData']['category']].append(testTemplate)
+
+                    pageTemplate = pageTemplate.replace('!!FUNCTIONALTESTS!!', '{br}'.join(testType['functional']))
+                    pageTemplate = pageTemplate.replace('!!PERFORMANCETESTS!!', '{br}'.join(testType['performance']))
+                    pageTemplate = pageTemplate.replace('!!STRESSTESTS!!', '{br}'.join(testType['stress']))
+                    print pageTemplate
+
         if self.globalVars['mode'] == 'testing':
             print >> sys.stderr, "\n\n" + xml().prettyXml(x)
             results = file().write('testsuite_results.xml', xml().prettyXml(x))
@@ -220,30 +287,6 @@ class __main__:
         print >> sys.stderr, "+  Copyright (C) 2011, Digium, Inc. -  www.digium.com  +"
         print >> sys.stderr, "--------------------------------------------------------\n"
 
-class documentation:
-    def processor(self, docs):
-        for category in docs:
-            for testCase in docs[category]:
-                for testName in docs[category][testCase]:
-                    print '{info:title=%s sub-test}{info}' % testName
-                    #print '\n\n%s\n' % docs[category][testCase][testName]['testData']
-                    #print '%s\n\n' % docs[category][testCase][testName]['pluginData']
-                    for data in docs[category][testCase][testName]['pluginData']:
-                        data['pluginName'] = data['pluginName'].capitalize()
-                        data['pluginName'] = data['pluginName'].replace('_', ' ')
-                        data['pluginName'] = data['pluginName'].replace('Asteriskscf', 'Asterisk SCF -')
-                        data['pluginName'] = data['pluginName'].replace('icebox', 'IceBox')
-                        data['pluginName'] = data['pluginName'].replace('Sipp', 'SIPp')
-                        print '{code:title=%s|borderStyle=solid}' % data['pluginName']
-                        for rpc in data['results']:
-
-                            #print 'xx %s\n' % rpc
-        
-                            if rpc['cmd'] == 'run' or rpc['cmd'] == 'setEnv':
-                                if rpc['cmd'] == 'run':
-                                    print ' '.join(rpc['args'][4])
-                        print '{code}'
-                    
                 #if wth['cmd'] == 'run' or wth['cmd'] == 'setEnv':
                 #    pass
                     #print wth['args'][1]['testInfo']['testPlugin']
@@ -339,13 +382,25 @@ class file:
         try:
             f = open('%s/%s' % (cwd, fn), 'w')
         except IOError:
-            return {'success':False, 'msg':'Failed to open test results output file: %s/tmp/%s' % (cwd, fn)}
+            return {'success':False, 'msg':'Failed to open test results output file: %s/%s' % (cwd, fn)}
         except:
             return {'success':False, 'msg':'Unexpected error: %s' % sys.exc_info()[0]}
         f.write(fd)
         f.close()
         return {'success':True}
 
+    def read(self, fn):
+        try:
+            f = open('%s/%s' % (cwd, fn), 'r')
+        except IOError:
+            return {'success':False, 'msg':'Failed to open file for reading: %s/%s' % (cwd, fn)}
+        except:
+            return {'success':False, 'msg':'Unexpected error: %s' % sys.exc_info()[0]}
+        else:
+            fc = f.read()
+            f.close()
+        return {'success':True, 'fd':fc.strip()}
+
 class cleanup:
     def __init__(self):
         self.dirs()

commit 8c414eb8027cdd8ec091c47547339dca6e468308
Author: Darren Sessions <dsessions at digium.com>
Date:   Mon Jun 27 08:53:09 2011 -0500

    nailed down all the test output for the testsuite documentation mode

diff --git a/lib/python/TestSuite.py b/lib/python/TestSuite.py
index dd380bc..0e7536a 100644
--- a/lib/python/TestSuite.py
+++ b/lib/python/TestSuite.py
@@ -14,6 +14,7 @@
 import os
 import sys
 import tarfile
+import datetime
 import xmlrpclib
 import subprocess
 
@@ -72,24 +73,41 @@ class utils():
                 self.rpc
             except:
                 self.rpc = {}
+            try: 
+                self.docs
+            except:
+                self.docs = []
 
         def connect(self, host):
             self.host = host
+            #self.rpc[self.host] = xmlrpclib.Server('http://%s:8000' % self.host)
+
+            #try:
+            #    timerStart = datetime.datetime.now().second
+            #    self.rpc[self.host].reset()
+            #    timerDelta = datetime.datetime.now().second - timerStart
+            #except:
+            #    return {'success':False,'msg':'Connection to %s was refused.' % self.host}
+          
+            #if timerDelta > 1:
+            #    print "\n!!WARNING!! - RPC connect times to '%s' are exceeding normal thresholds and may effect test times.\n" % self.host
+        
+            #ipv4, ipv6 = self.rpc[self.host].whatAreMyIps()
+
+            ipv4 = '1.1.1.1'
+            ipv6 = '2.2.2.2'
+
             if self.globalVars['mode'] == 'testing':
-                self.rpc[self.host] = xmlrpclib.Server('http://%s:8000' % self.host)
-                try:
-                    self.rpc[self.host].reset()
-                except:
-                    return {'success':False,'msg':'Connection to %s was refused.' % self.host}
-                ipv4, ipv6 = self.rpc[self.host].whatAreMyIps() 
                 return {'success':True, 'rpc':self.testingCmd, 'ipv4':ipv4, 'ipv6':ipv6, 'hostname':self.host.split('.')[0], 'fqdn':self.host}
             elif self.globalVars['mode'] == 'docs':
-                self.rpc[self.host] = 'testing'
-                ipv4, ipv6 = '1.1.1.1', '2.2.2.2'
                 return {'success':True, 'rpc':self.docCmd, 'ipv4':ipv4, 'ipv6':ipv6, 'hostname':self.host.split('.')[0], 'fqdn':self.host}
 
         def docCmd(self, cmd, *args):
-            return {'success':'docs','docs':{'cmd':cmd, 'args':str(args)}}
+            argList = []
+            for arg in args:
+                argList.append(arg)
+            self.docs.append({'cmd':cmd,'args':argList})
+            return {'success':'docs','docs':self.docs}
 
         def testingCmd(self, cmd, *args):
             try:
diff --git a/testsuite.py b/testsuite.py
index 6a21f97..1942139 100755
--- a/testsuite.py
+++ b/testsuite.py
@@ -56,7 +56,8 @@ class __main__:
             self.globalVars['bambooBuildNum'] = argv[3]
             self.globalVars['bambooBuildURL'] = 'http://bamboo.asterisk.org/artifact/%s/build-%s/Artifacts/' % (re.sub(r'SUITE-', 'SUITE/', self.globalVars['bambooBuildKey']), self.globalVars['bambooBuildNum'])
         else:
-            print >> sys.stderr, ' NOTE: The Bamboo build key and build number are both\n       required to generate artifact link URLs.\n'
+            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 self.globalVars['mode'] == 'testing' and not self.globalVars['mode'] == 'docs':
             print >> sys.stderr, ' %s is an invalid mode.' % self.globalVars['mode']
@@ -106,8 +107,12 @@ class __main__:
                         if stopTests == True:
                             break
                         for testName in subTestCase:
+                            ''' TEMP CODE TO MAKE SINGLE TEST FOR DOC PROCESSOR '''
+                            ''' TEMP CODE TO MAKE SINGLE TEST FOR DOC PROCESSOR '''
                             if not testData['docs']['list_test'] == testName:
                                 break
+                            ''' TEMP CODE TO MAKE SINGLE TEST FOR DOC PROCESSOR '''
+                            ''' TEMP CODE TO MAKE SINGLE TEST FOR DOC PROCESSOR '''
                             self.globalVars['testSuccess'] = True
                             self.globalVars['testMsg'] = ''
                             self.globalVars['testInfo']['testCategory'] = testCategory
@@ -115,7 +120,7 @@ class __main__:
                             self.globalVars['testInfo']['testName'] = testName
                             self.globalVars['testInfo']['testPath'] = "%s/%s/%s" % (testCategory, testData['name'], testName)
                             self.globalVars['testInfo']['testOpts'] = testData['options'] 
-                            docs = {testCategory:{testData['name']:{testName:[]}}}
+                            docs = {testCategory:{testData['name']:{testName:{'pluginData':[], 'testData':{}}}}}
 
                             if self.globalVars['mode'] == 'testing':
                                 testElement, subTestElement = xml().addTestCase(testElement, testName)
@@ -157,8 +162,7 @@ class __main__:
                                                 self.globalVars['testMsg'] = runResults['msg'] = "'%s' plugin: %s" % (plugin, runResults['msg'])
                                                 break
                                         if runResults['success'] == 'docs':
-                                            print type(runResults['docs']['args'])
-                                            docs[testCategory][testData['name']][testName].append(runResults['docs'])
+                                            docs[testCategory][testData['name']][testName]['pluginData'].append({'pluginName':plugin,'results':runResults['docs']})
                             
                                 if self.globalVars['mode'] == 'testing':            
                                     ''' get timer delta '''
@@ -189,9 +193,7 @@ class __main__:
                                     print >> sys.stderr, '   |- ' + testName + ' - PASSED! - %s.%s seconds' % (timerDelta.seconds, timerDelta.microseconds)
                                     subTestElement = xml().setProperty(subTestElement, 'time', '%s.%s' % (timerDelta.seconds, timerDelta.microseconds))
                                 elif self.globalVars['mode'] == 'docs':
-                                    print '\n'
-                                    print docs
-                                    #documentation().processor(docs)
+                                    documentation().processor(docs)
                             else:
                                 print >> sys.stderr, '   |- ' + testName + ' - FAILED!\n    \- No test data defined!'
                                 subTestElement, errorMsgs = xml().addFailure(subTestElement, ['No test data defined!'])
@@ -220,11 +222,28 @@ class __main__:
 
 class documentation:
     def processor(self, docs):
-        for wit in docs:
-            print '\n\n%s\n\n' % wit
-            #print wit['cmd']
-            print type(wit['args'])
-            print '\n'
+        for category in docs:
+            for testCase in docs[category]:
+                for testName in docs[category][testCase]:
+                    print '{info:title=%s sub-test}{info}' % testName
+                    #print '\n\n%s\n' % docs[category][testCase][testName]['testData']
+                    #print '%s\n\n' % docs[category][testCase][testName]['pluginData']
+                    for data in docs[category][testCase][testName]['pluginData']:
+                        data['pluginName'] = data['pluginName'].capitalize()
+                        data['pluginName'] = data['pluginName'].replace('_', ' ')
+                        data['pluginName'] = data['pluginName'].replace('Asteriskscf', 'Asterisk SCF -')
+                        data['pluginName'] = data['pluginName'].replace('icebox', 'IceBox')
+                        data['pluginName'] = data['pluginName'].replace('Sipp', 'SIPp')
+                        print '{code:title=%s|borderStyle=solid}' % data['pluginName']
+                        for rpc in data['results']:
+
+                            #print 'xx %s\n' % rpc
+        
+                            if rpc['cmd'] == 'run' or rpc['cmd'] == 'setEnv':
+                                if rpc['cmd'] == 'run':
+                                    print ' '.join(rpc['args'][4])
+                        print '{code}'
+                    
                 #if wth['cmd'] == 'run' or wth['cmd'] == 'setEnv':
                 #    pass
                     #print wth['args'][1]['testInfo']['testPlugin']

commit 6e3213b18b0711d67b58236ea74791614bb4f325
Author: Darren Sessions <dsessions at digium.com>
Date:   Sun Jun 26 21:59:08 2011 -0500

    Additional work on the documentation mode within the testsuite. Specifically, fixed an issue with the documentation mode within the RPC class whereby the argument tuple was returning the actual name of a variable instead of the variable contents. This was fixed by converting tuple to a string (untested yet), although, I suspect I will end up iterating through the tuple contents to create proper variable types with contents.

diff --git a/lib/python/TestSuite.py b/lib/python/TestSuite.py
index 9ba1126..dd380bc 100644
--- a/lib/python/TestSuite.py
+++ b/lib/python/TestSuite.py
@@ -20,12 +20,16 @@ import subprocess
 from urlparse import urlparse
 
 class utils():
+    def run(self, testData, testPath, globalVars):
+        self.RPC.globalVars = globalVars
+        return self.baseClass(testData, testPath, globalVars)
+        
     def ping(self, host):
         process = subprocess.Popen(
                 'ping -c1 %s' % host,
-                stdin=subprocess.PIPE,
-                stdout=subprocess.PIPE,
-                stderr=subprocess.PIPE,
+                #stdin=subprocess.PIPE,
+                #stdout=subprocess.PIPE,
+                #stderr=subprocess.PIPE,
                 shell=True)
         process.wait()
         if process.returncode == 0:
@@ -71,15 +75,23 @@ class utils():
 
         def connect(self, host):
             self.host = host
-            self.rpc[self.host] = xmlrpclib.Server('http://%s:8000' % self.host)
-            try:
-                self.rpc[self.host].reset()
-            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], 'fqdn':self.host}
-
-        def cmd(self, cmd, *args):
+            if self.globalVars['mode'] == 'testing':
+                self.rpc[self.host] = xmlrpclib.Server('http://%s:8000' % self.host)
+                try:
+                    self.rpc[self.host].reset()
+                except:
+                    return {'success':False,'msg':'Connection to %s was refused.' % self.host}
+                ipv4, ipv6 = self.rpc[self.host].whatAreMyIps() 
+                return {'success':True, 'rpc':self.testingCmd, 'ipv4':ipv4, 'ipv6':ipv6, 'hostname':self.host.split('.')[0], 'fqdn':self.host}
+            elif self.globalVars['mode'] == 'docs':
+                self.rpc[self.host] = 'testing'
+                ipv4, ipv6 = '1.1.1.1', '2.2.2.2'
+                return {'success':True, 'rpc':self.docCmd, 'ipv4':ipv4, 'ipv6':ipv6, 'hostname':self.host.split('.')[0], 'fqdn':self.host}
+
+        def docCmd(self, cmd, *args):
+            return {'success':'docs','docs':{'cmd':cmd, 'args':str(args)}}
+
+        def testingCmd(self, cmd, *args):
             try:
                 func = getattr(self.rpc[self.host], cmd)
             except AttributeError:
@@ -126,7 +138,7 @@ class utils():
             return {'success':True, 'repoName':repoName, 'repoType':'%s' % url[0]}
 
 class BaseClass(utils):
-    def run(self, testData, testPath, globalVars):
+    def baseClass(self, testData, testPath, globalVars):
         if globalVars['testSuccess'] == False:
             if 'run_on_test_failure' in testData:
                 if testData['run_on_test_failure'] == False:
@@ -138,7 +150,7 @@ class BaseClass(utils):
         return self.main(testData, testPath, globalVars)
 
 class RemoteBaseClass(utils):
-    def run(self, testData, testPath, globalVars):
+    def baseClass(self, testData, testPath, globalVars):
         if globalVars['testSuccess'] == False: 
             if 'run_on_test_failure' in testData:
                 if testData['run_on_test_failure'] == False:
diff --git a/testsuite.py b/testsuite.py
index 9dc7eaf..6a21f97 100755
--- a/testsuite.py
+++ b/testsuite.py
@@ -93,15 +93,15 @@ class __main__:
                         print >> sys.stderr, ' |- Testcase: %s ' % testData['name']
                     if not 'options' in testData:
                         testData['options'] = {}
+                    if self.globalVars['mode'] == 'docs':
+                        if not 'docs' in testData:
+                            print >> sys.stderr, 'No documentation found for testcase: %s' % testData['name']
+                            break
+                        else:
+                            print >> sys.stderr, 'Loading documentation for testcase: %s' % testData['name']
+                        #print testData['docs']
+
                     for subTestCase in testData['tests']:
-                        if self.globalVars['mode'] == 'docs':
-                            if not 'docs' in testData:
-                                print >> sys.stderr, 'No documentation specified for testcase: %s' % testData['name']
-                                break  
-                            else:
-                                print >> sys.stderr, 'Loading documentation for testcase: %s' % testData['name']
-                            print testData['docs']
-                        docs = []
                         timerStart = datetime.datetime.now()
                         if stopTests == True:
                             break
@@ -115,6 +115,7 @@ class __main__:
                             self.globalVars['testInfo']['testName'] = testName
                             self.globalVars['testInfo']['testPath'] = "%s/%s/%s" % (testCategory, testData['name'], testName)
                             self.globalVars['testInfo']['testOpts'] = testData['options'] 
+                            docs = {testCategory:{testData['name']:{testName:[]}}}
 
                             if self.globalVars['mode'] == 'testing':
                                 testElement, subTestElement = xml().addTestCase(testElement, testName)
@@ -141,23 +142,23 @@ class __main__:
                                 ''' execute testcase timeline '''
                                 for timeLine in subTestCase[testName]['timeline']:
                                     for plugin in timeLine:
-                                        #print '\n\n%s\n\n' % plugin
                                         self.globalVars['testInfo']['testPlugin'] = plugin
                                         runResults = plugins().execute(plugin, pluginData[plugin]['module'], timeLine[plugin], testData['path'], self.globalVars)
-                                        if not 'shutdownList' in runResults:
-                                            if not 'shutdownExempt' in runResults:
-                                                if 'testsuite_remote_host' in timeLine[plugin]:
-                                                    shutdownList.append({timeLine[plugin]['testsuite_remote_host']:plugin})
-                                        else:
-                                            for remote in runResults['shutdownList']:
-                                               shutdownList.append({remote:plugin})
-                                        if runResults['success'] == False and self.globalVars['testSuccess'] == True:
-                                            self.globalVars['testSuccess'] = False
-                                            self.globalVars['testMsg'] = runResults['msg'] = "'%s' plugin: %s" % (plugin, runResults['msg'])
-                                            break
+                                        if self.globalVars['mode'] == 'testing': 
+                                            if not 'shutdownList' in runResults:
+                                                if not 'shutdownExempt' in runResults:
+                                                    if 'testsuite_remote_host' in timeLine[plugin]:
+                                                        shutdownList.append({timeLine[plugin]['testsuite_remote_host']:plugin})
+                                            else:
+                                                for remote in runResults['shutdownList']:
+                                                    shutdownList.append({remote:plugin})
+                                            if runResults['success'] == False and self.globalVars['testSuccess'] == True:
+                                                self.globalVars['testSuccess'] = False
+                                                self.globalVars['testMsg'] = runResults['msg'] = "'%s' plugin: %s" % (plugin, runResults['msg'])
+                                                break
                                         if runResults['success'] == 'docs':
-                                            #print runResults['docs']
-                                            docs.append(runResults['docs'])
+                                            print type(runResults['docs']['args'])
+                                            docs[testCategory][testData['name']][testName].append(runResults['docs'])
                             
                                 if self.globalVars['mode'] == 'testing':            
                                     ''' get timer delta '''
@@ -188,7 +189,9 @@ class __main__:
                                     print >> sys.stderr, '   |- ' + testName + ' - PASSED! - %s.%s seconds' % (timerDelta.seconds, timerDelta.microseconds)
                                     subTestElement = xml().setProperty(subTestElement, 'time', '%s.%s' % (timerDelta.seconds, timerDelta.microseconds))
                                 elif self.globalVars['mode'] == 'docs':
-                                    documentation().processor(docs)
+                                    print '\n'
+                                    print docs
+                                    #documentation().processor(docs)
                             else:
                                 print >> sys.stderr, '   |- ' + testName + ' - FAILED!\n    \- No test data defined!'
                                 subTestElement, errorMsgs = xml().addFailure(subTestElement, ['No test data defined!'])
@@ -218,15 +221,19 @@ class __main__:
 class documentation:
     def processor(self, docs):
         for wit in docs:
-            for wth in wit:
-                if wth['cmd'] == 'run':
-                    print wth['args'][1]['testInfo']['testPlugin']
-                    args = ' '.join(wth['args'][4])
-                    args = args.replace('!!TMP!!/sipp/sipp/trunk/sipp', 'sipp')
-                    args = args.replace('!!CWD!!/tests/sip/Functional_Basic_Call_Forward_Blind_Transfer/scenarios/', './')
-                    args = args.replace('!!TMP!!/', './')
-                    args = args.replace('/tmp/', './')
-                    print args
+            print '\n\n%s\n\n' % wit
+            #print wit['cmd']
+            print type(wit['args'])
+            print '\n'
+                #if wth['cmd'] == 'run' or wth['cmd'] == 'setEnv':
+                #    pass
+                    #print wth['args'][1]['testInfo']['testPlugin']
+                    #args = ' '.join(wth['args'][4])
+                    #args = args.replace('!!TMP!!/sipp/sipp/trunk/sipp', 'sipp')
+                    #args = args.replace('!!CWD!!/tests/sip/Functional_Basic_Call_Forward_Blind_Transfer/scenarios/', './')
+                    #args = args.replace('!!TMP!!/', './')
+                    #args = args.replace('/tmp/', './')
+                    #print args
         
 class plugins:
     def execute(self, name, module, testData, testPath, globalVars):

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


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list