[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
Tue May 24 09:30:31 CDT 2011


branch "review" has been updated
       via  47b269ea1efb00faad6f845d2eae8d4d293c5176 (commit)
      from  126d622cc299b903ea809c54a142269d1627139e (commit)

Summary of changes:
 plugins/build.py                            |   12 ++++--------
 remote.py                                   |   14 +++++---------
 tests/build/Build_AsteriskSCF/testcase.yaml |    7 +++++++
 3 files changed, 16 insertions(+), 17 deletions(-)


- Log -----------------------------------------------------------------
commit 47b269ea1efb00faad6f845d2eae8d4d293c5176
Author: Darren Sessions <dsessions at digium.com>
Date:   Tue May 24 09:30:29 2011 -0500

    builds working 100% remotely. just need to add the ability to redistribute built code.

diff --git a/plugins/build.py b/plugins/build.py
index 61fe962..c321929 100644
--- a/plugins/build.py
+++ b/plugins/build.py
@@ -13,9 +13,6 @@ import util
 
 class testsuite(util.TestSuiteRemoteBaseClass):
     def main(self, testData, testPath, rpc):
-
-        print testData
-    
         if not 'repo' in testData['cmd']:
             return {'success':False,'msg':'No repo specified.'}
 
@@ -49,13 +46,12 @@ class testsuite(util.TestSuiteRemoteBaseClass):
             if results['success'] == False:
                 return results
 
-        if 'cd' in testData['cmd']:
-            results = rpc.changeDir(testData['cmd']['cd'])
-            if results['success'] == False:
-                return results
-
         if 'make_cmd' in testData['cmd']:
             for cmds in testData['cmd']['make_cmd']:
+                if 'cd' in testData['cmd']:
+                    results = rpc.changeDir(testData['cmd']['cd'])
+                    if results['success'] == False:
+                        return results
                 results = rpc.run('build', cmds, cmds.split(' '), True)
                 if results['success'] == False:
                     return results
diff --git a/remote.py b/remote.py
index 5cd41f0..7f69675 100755
--- a/remote.py
+++ b/remote.py
@@ -35,10 +35,8 @@ class RemoteManagement(object):
             list[plugin] = []
             for label in processList[plugin]:
                 list[plugin].append(label)
-
         if list:
             return {'success':True,'msg':list} 
-
         return {'success':True,'msg':'Nothing running.'}
 
     def run(self, plugin, label, execCmd, wait=False):
@@ -73,11 +71,11 @@ class RemoteManagement(object):
         else:
             return {'success':False,"msg":"FAILED TO EXECUTE '%s', it must exist and be executable" % ' '.join(execCmd)}
 
-        if not plugin in processList:
-            processList[plugin] = {}
-
-        if not label in processList[plugin]:
-            processList[plugin][label] = {'exec':' '.join(execCmd),'subprocess':p}
+        if wait == False:
+            if not plugin in processList:
+                processList[plugin] = {}
+            if not label in processList[plugin]:
+                processList[plugin][label] = {'exec':' '.join(execCmd),'subprocess':p}
 
         return {'success':True}
 
@@ -178,9 +176,7 @@ class RemoteManagement(object):
     def _which(self, app):
         def if_exists(fp):
             return os.path.exists(fp) and os.access(fp, os.X_OK)
-
         fp, fn = os.path.split(app)
-
         if fp:
             if if_exists(app):
                 return app
diff --git a/tests/build/Build_AsteriskSCF/testcase.yaml b/tests/build/Build_AsteriskSCF/testcase.yaml
index 9dfe806..542f3f1 100644
--- a/tests/build/Build_AsteriskSCF/testcase.yaml
+++ b/tests/build/Build_AsteriskSCF/testcase.yaml
@@ -11,6 +11,13 @@ tests :
                     make_cmd : 
                         - make
                         - make install
+                    redistribute :
+                        remotes :
+                            - testsuite-remote-1.digium.internal
+                            - testsuite-remote-2.digium.internal
+                        send_dir : ice
+                        make_cmd :
+                            - make install
     - ice_python :
         timeline :
             - build :

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


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list