[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:59:05 CDT 2011


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

Summary of changes:
 plugins/build.py |    7 ++++---
 remote.py        |   15 ++++++++++-----
 2 files changed, 14 insertions(+), 8 deletions(-)


- Log -----------------------------------------------------------------
commit cb204490bec2a36e5b2eb31e4dfd5f1a92538318
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed May 25 10:59:03 2011 -0500

    finished up the build plugin and tested with ice cpp, ice py, and slice plugins. needed to close a file handle and some other minor tweaks.

diff --git a/plugins/build.py b/plugins/build.py
index 874ea1e..d97b9d9 100644
--- a/plugins/build.py
+++ b/plugins/build.py
@@ -64,9 +64,10 @@ class testsuite(util.TestSuiteRemoteBaseClass):
             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
+                try:
+                    rpc.removeFile('tmp.tar.gz')
+                except:
+                    pass
 
                 results = rpc.archiveDir(testData['cmd']['redistribute']['send_dir'])
                 if results['success'] == False:
diff --git a/remote.py b/remote.py
index 4406053..6072048 100755
--- a/remote.py
+++ b/remote.py
@@ -52,8 +52,9 @@ class RemoteManagement(object):
             except:
                 pass
 
-        execCmd[0] = self._which(execCmd[0])
+        time.sleep(1)
 
+        execCmd[0] = self._which(execCmd[0])
         if os.path.exists(execCmd[0]) and os.access(execCmd[0], os.X_OK):
             p = subprocess.Popen(
                 execCmd,
@@ -63,7 +64,6 @@ class RemoteManagement(object):
                 #stdout=subprocess.PIPE,
                 #stderr=subprocess.PIPE
             )
-            time.sleep(1)
             p.poll()
             if wait == True:
                 p.wait()
@@ -201,7 +201,7 @@ class RemoteManagement(object):
     def remoteSideRecvFile(self, fn, fd, installPath):
         w = open('%s/tmp/%s' % (cwd, fn), "wb")
         wc = w.write(fd.data)
-        w.close
+        w.close()
         results = self.run('remoteSideRecvFile', 'tar', ['tar', '-xvf', '%s/tmp/%s' % (cwd, fn), '-C', '%s' % installPath], True)
         if results['success'] == False:
             return results
@@ -213,9 +213,14 @@ class RemoteManagement(object):
             rpc.reset()
         except:
             return {'success':False,'msg':'%s is unable to transfer files to %s. Connection refused.' % (server, remote)}
-        rpc.removeFile(fn)
+        try:
+            rpc.removeFile(fn)
+        except:
+            pass
         r = open('%s/tmp/%s' % (cwd, fn), "rb")
-        return rpc.remoteSideRecvFile(fn, xmlrpclib.Binary(r.read()), installPath)
+        results = rpc.remoteSideRecvFile(fn, xmlrpclib.Binary(r.read()), installPath)
+        r.close()
+        return results
 
     def reset(self):
         os.chdir('%s/tmp' % cwd)

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


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list