[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 8 11:59:34 CDT 2011


branch "review" has been updated
       via  ffe9d8885f789b78724c78d876af0f4fd3ae7859 (commit)
      from  479dbc2ecd18504df6d05506c64f0e21ac5d0f65 (commit)

Summary of changes:
 plugins/testsuite_remotes.py |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit ffe9d8885f789b78724c78d876af0f4fd3ae7859
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 8 11:59:32 2011 -0500

    added artifact retrieval from the remote test-suite nodes to the shutdown event so that all data can be consolidated and sent to bamboo.

diff --git a/plugins/testsuite_remotes.py b/plugins/testsuite_remotes.py
index f0fbfa1..3f0662f 100644
--- a/plugins/testsuite_remotes.py
+++ b/plugins/testsuite_remotes.py
@@ -38,8 +38,32 @@ class plugin(TestSuite.BaseClass):
                     results = rpc[remote]['rpc']('makeDir', '!!TMP!!/artifacts')
                     if results['success'] == False:
                         return results
+
             elif cmd == 'cleanup':
-                print 'shutdown'
+                ''' Quick check to make sure we can connect to the remotes before we do anything else. '''
+                for remote in testData['cmd']['cleanup']:
+                    rpc[remote] = self.RPC().connect(remote)
+                    if rpc[remote]['success'] == False:
+                        return rpc[remote]
+
+                for remote in testData['cmd']['cleanup']:
+                    results = rpc[remote]['rpc']('removeFile', 'tmp.tar.gz')
+                    if results['success'] == False:
+                        return results
+
+                    results = rpc[remote]['rpc']('archiveDir', globalVars, 'artifacts')
+                    if results['success'] == False:
+                        return results
+
+                    results = rpc[remote]['rpc']('readFile', 'tmp.tar.gz')
+                    if results['success'] == False:
+                        return results
+
+                    results = self.installFromRemote(globalVars['cwd'], 'tmp.tar.gz', results['data'], '!!TMP!!')
+                    if results['success'] == False:
+                        return results
+
+                return {'success':True}
             else:
                 return {'success':False,'msg':'The %s command is invalid.' % cmd}
 

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


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list