[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 May 23 11:11:36 CDT 2011


branch "review" has been updated
       via  0f66f456ca42a1b5911576a67314c342fa12ca7f (commit)
      from  8881969fbc604aacd60984580457659f65d7bd68 (commit)

Summary of changes:
 plugins/{failover.py => build.py} |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)
 copy plugins/{failover.py => build.py} (68%)


- Log -----------------------------------------------------------------
commit 0f66f456ca42a1b5911576a67314c342fa12ca7f
Author: Darren Sessions <dsessions at digium.com>
Date:   Mon May 23 11:11:30 2011 -0500

    started work on the build plugin for the test-suite.

diff --git a/plugins/build.py b/plugins/build.py
new file mode 100644
index 0000000..1179288
--- /dev/null
+++ b/plugins/build.py
@@ -0,0 +1,60 @@
+'''
+
+ Build Plugin
+
+ Copyright (C) 2011, Digium, Inc.
+
+ This program is free software, distributed under the terms of
+ the GNU General Public License Version 2.
+
+'''
+
+import util
+
+class testsuite(util.TestSuiteRemoteBaseClass):
+    def main(self, testData, testPath, rpc):
+
+        ''' start and stop individual components. shutdown is implemented in the main testsuite code ''' 
+    
+        if not 'git_repo' in testData['cmd'] and not 'svn_repo' in testData['cmd']:
+            return {'success':False,'msg':'No repo specified.'}
+        else:
+            if 'git_repo' in testData['cmd']:
+                repoType = 'git'
+                repo = testData['cmd']['git_repo']
+            elif 'svn_repo' in testData['cmd']:
+                repoType = 'svn'
+                repo = testData['cmd']['svn_repo']
+
+        results = fetchRepoName(repo)
+        if results['success'] == False:
+            return results
+        else:
+            repoName = results['repoName']
+
+       
+        ''' 
+        for cmd in testData['cmd']:
+            if cmd == 'start':
+                for component in testData['cmd']['start']:
+                    print component
+                    #results = rpc.writeFile('%s.conf' % component, '\n'.join(self._componentConfig(component)))
+                    #if results['success'] == False:
+                    #    return results
+                    #results = rpc.setEnvVar('libpath', '!!TMP!!/gitall/build/lib')
+                    #if results['success'] == False:
+                    #    return results
+                    #results = rpc.run('asteriskscf_icebox', component, [iceBoxCmd[0], "%s%s.conf" % (iceBoxCmd[1], component)])
+                    #if results['success'] == False:
+                    #    return results
+            elif cmd == 'stop':
+                print 'stop'
+            else:
+                return {'success':False,'msg':'The %s command is invalid.' % cmd}
+        '''
+
+        return {'success':False}
+
+        return {'success':True}
+
+    def _componentConfig(self, mode, config, testPath):

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


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list