[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 May 25 10:29:14 CDT 2011


branch "review" has been updated
       via  cac54ce33be5d4a8ea68df33289ac3f83eb46e55 (commit)
      from  bdfef11e6cb7fd5163e06af41580f736e0ae0686 (commit)

Summary of changes:
 plugins/build.py                            |   12 ++++++------
 remote.py                                   |    9 ++++++---
 tests/build/Build_AsteriskSCF/testcase.yaml |   18 +-----------------
 3 files changed, 13 insertions(+), 26 deletions(-)


- Log -----------------------------------------------------------------
commit cac54ce33be5d4a8ea68df33289ac3f83eb46e55
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed May 25 10:28:34 2011 -0500

    added the install capability to the remote script, testcase, and build plugin.

diff --git a/plugins/build.py b/plugins/build.py
index 0859103..874ea1e 100644
--- a/plugins/build.py
+++ b/plugins/build.py
@@ -61,21 +61,21 @@ class testsuite(util.TestSuiteRemoteBaseClass):
                     return results
             
         if 'redistribute' in testData['cmd']:
-            if not 'remotes' in testData['cmd']['redistribute'] and not 'send_dir' in testData['cmd']['redistribute']:
+            if not 'remotes' in testData['cmd']['redistribute'] and not 'send_dir' in testData['cmd']['redistribute'] and not 'install_dir' in testData['cmd']['redistribute']:
                 return {'success':False,'msg':'The restribute element requires the remotes and send_dir options.'}
             else:
+                results = rpc.removeFile('tmp.tar.gz')
+                if results['success'] == False:
+                    return results
+
                 results = rpc.archiveDir(testData['cmd']['redistribute']['send_dir'])
                 if results['success'] == False:
                     return results
                
                 for remote in testData['cmd']['redistribute']['remotes']:
-                    results = rpc.serverSideSendFile(testData['testsuite_remote'], remote, 'tmp.tar.gz')
+                    results = rpc.serverSideSendFile(testData['testsuite_remote'], remote, 'tmp.tar.gz', testData['cmd']['redistribute']['install_dir'])
                     if results['success'] == False:
                         return results
-
-                results = rpc.removeFile('tmp.tar.gz')
-                if results['success'] == False:
-                    return results
         
         return {'success':True,'shutdownExempt':True}
 
diff --git a/remote.py b/remote.py
index 0ebfd9a..4406053 100755
--- a/remote.py
+++ b/remote.py
@@ -198,13 +198,16 @@ class RemoteManagement(object):
         f.close()
         return {'success':True}
 
-    def remoteSideRecvFile(self, fn, fd):
+    def remoteSideRecvFile(self, fn, fd, installPath):
         w = open('%s/tmp/%s' % (cwd, fn), "wb")
         wc = w.write(fd.data)
         w.close
+        results = self.run('remoteSideRecvFile', 'tar', ['tar', '-xvf', '%s/tmp/%s' % (cwd, fn), '-C', '%s' % installPath], True)
+        if results['success'] == False:
+            return results
         return {'success':'True'}
 
-    def serverSideSendFile(self, server, remote, fn):
+    def serverSideSendFile(self, server, remote, fn, installPath):
         rpc = xmlrpclib.ServerProxy('http://%s:8000/' % remote)
         try:
             rpc.reset()
@@ -212,7 +215,7 @@ class RemoteManagement(object):
             return {'success':False,'msg':'%s is unable to transfer files to %s. Connection refused.' % (server, remote)}
         rpc.removeFile(fn)
         r = open('%s/tmp/%s' % (cwd, fn), "rb")
-        return rpc.remoteSideRecvFile(fn, xmlrpclib.Binary(r.read()))
+        return rpc.remoteSideRecvFile(fn, xmlrpclib.Binary(r.read()), installPath)
 
     def reset(self):
         os.chdir('%s/tmp' % cwd)
diff --git a/tests/build/Build_AsteriskSCF/testcase.yaml b/tests/build/Build_AsteriskSCF/testcase.yaml
index 07eba9b..df4f970 100644
--- a/tests/build/Build_AsteriskSCF/testcase.yaml
+++ b/tests/build/Build_AsteriskSCF/testcase.yaml
@@ -39,20 +39,4 @@ tests :
                             - testsuite-remote-1.digium.internal
                             - testsuite-remote-2.digium.internal
                         send_dir : '/opt/Ice-3.4.1'
-    - asterisk_scf :
-        timeline:
-            - build :
-                testsuite_remote : testsuite-builder-1.digium.internal
-                cmd :
-                    pull_update : True
-                    repo : 'git://git.asterisk.org/asterisk-scf/integration/gitall'
-                    cd : gitall
-                    make_cmd :
-                        - ./gitall-asterisk-scf.sh
-                        - cmake/init-cmake.sh
-                        - cmake --build ./build
-                    redistribute :
-                        remotes :
-                            - testsuite-remote-1.digium.internal
-                            - testsuite-remote-2.digium.internal
-                        send_dir : '/opt/Ice-3.4.1'
+                        install_dir : /

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


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list