[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 16:00:17 CDT 2011


branch "review" has been updated
       via  8c96df01fb9027464a23ded1c78a6770517d5474 (commit)
      from  53939b17f95c4f42353ace7bdfead43c7be0e31e (commit)

Summary of changes:
 lib/python/util.py |    2 +-
 remote.py          |   13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)


- Log -----------------------------------------------------------------
commit 8c96df01fb9027464a23ded1c78a6770517d5474
Author: Darren Sessions <dsessions at digium.com>
Date:   Mon May 23 16:00:15 2011 -0500

    minor path tweaks

diff --git a/lib/python/util.py b/lib/python/util.py
index f0debb5..8bf1605 100644
--- a/lib/python/util.py
+++ b/lib/python/util.py
@@ -36,7 +36,7 @@ class TestSuiteRemoteBaseClass:
             return {'success':False,'msg':'No testsuite remote specified.'}
         rpc = xmlrpclib.Server('http://%s:8000' % testData['testsuite_remote'])
         try:
-            rpc.testRPC()
+            rpc.reset()
         except:
             return {'success':False,'msg':'Connection to %s was refused.' % testData['testsuite_remote']}
 
diff --git a/remote.py b/remote.py
index 42c2847..f957053 100755
--- a/remote.py
+++ b/remote.py
@@ -25,6 +25,10 @@ plat = platform.system()
 processList = {}
 
 class RemoteManagement(object):
+    def __init__(self):
+        if not os.path.exists('%s/tmp' % cwd):
+            os.makedirs('%s/tmp' % cwd)
+
     def listProcesses(self):
         list = {}
         for plugin in processList:
@@ -38,7 +42,6 @@ class RemoteManagement(object):
         return {'success':True,'msg':'Nothing running.'}
 
     def run(self, plugin, label, execCmd, wait = False):
-        os.chdir(cwd)
         if plugin in processList:
             if label in processList[plugin]:
                 return {'success':False,'msg':'%s executed by the %s plugin is already running.' % (label, plugin)}
@@ -147,22 +150,18 @@ class RemoteManagement(object):
         return {'success':True}
 
     def writeFile(self, fn, fd):
-        if not os.path.exists('%s/tmp' % cwd):
-            os.makedirs('%s/tmp' % cwd)
-
         try:
             f = open("%s/tmp/%s" % (cwd, fn), "w")
         except IOError:
             return {'success':False,'msg':'Failed to open test results output file: %s/tmp/%s' % (cwd, fn)}
         except:
             return {'success':False,'msg':'Unexpected error: %s' % sys.exc_info()[0]}
-
         f.write(fd)
         f.close()
         return {'success':True}
 
-    def testRPC(self):
-        return 1
+    def reset(self):
+        os.chdir('%s' % cwd)
 
     def _which(self, app):
         def if_exists(fp):

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


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list