[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
Thu May 26 15:43:34 CDT 2011


branch "review" has been updated
       via  965ab73f40e90e15ab2716212f277709e685a48a (commit)
       via  f8e23d97ad39e59359616d78995550151c280dc4 (commit)
      from  e90197a1b5da98fc0275b672125cb7fb5cfb0aaf (commit)

Summary of changes:
 plugins/asteriskscf_configurator.py |    4 ++--
 plugins/asteriskscf_icebox.py       |    4 ++--
 plugins/build.py                    |    6 +++---
 plugins/sipp.py                     |    6 +++---
 remote.py                           |    1 +
 5 files changed, 11 insertions(+), 10 deletions(-)


- Log -----------------------------------------------------------------
commit 965ab73f40e90e15ab2716212f277709e685a48a
Author: Darren Sessions <dsessions at digium.com>
Date:   Thu May 26 15:43:32 2011 -0500

    fixed the path in the remote file transfer to properly replace !!TMP!! with <current working dir>/tmp

diff --git a/remote.py b/remote.py
index d09acea..274cd40 100755
--- a/remote.py
+++ b/remote.py
@@ -208,7 +208,7 @@ class RemoteManagement(object):
         w = open('%s/tmp/%s' % (cwd, fn), "wb")
         wc = w.write(fd.data)
         w.close()
-        installPath = installPath.replace('!!TMP!!', cwd)
+        installPath = installPath.replace('!!TMP!!', '%s/tmp' % cwd)
         results = self.run('remoteSideRecvFile', 'tar', ['tar', '-xvf', '%s/tmp/%s' % (cwd, fn), '-C', '%s' % installPath], True)
         if results['success'] == False:
             return results

commit f8e23d97ad39e59359616d78995550151c280dc4
Author: Darren Sessions <dsessions at digium.com>
Date:   Thu May 26 15:40:39 2011 -0500

    converted the remaining plugins to use the new test-suite base classes. added a replace string in the file transfer function in the remote script so that !!TMP!! gets replaced with the current working directory.

diff --git a/plugins/asteriskscf_configurator.py b/plugins/asteriskscf_configurator.py
index 5efc4f8..4ac4cdc 100644
--- a/plugins/asteriskscf_configurator.py
+++ b/plugins/asteriskscf_configurator.py
@@ -12,13 +12,13 @@
 import os
 import sys
 import time
-import util
+import TestSuite
 
 sys.path.append('/opt/Ice-3.4.1/python')
 
 import Ice
 
-class testsuite(util.TestSuiteBaseClass):
+class plugin(TestSuite.BaseClass):
     def main(self, testData, testPath):
         if not 'configuration_wipe' in testData:
             testData['configuration_wipe'] = None
diff --git a/plugins/asteriskscf_icebox.py b/plugins/asteriskscf_icebox.py
index 22bc46c..e6f4364 100644
--- a/plugins/asteriskscf_icebox.py
+++ b/plugins/asteriskscf_icebox.py
@@ -9,9 +9,9 @@
 
 '''
 
-import util
+import TestSuite
 
-class testsuite(util.TestSuiteRemoteBaseClass):
+class plugin(TestSuite.RemoteBaseClass):
     def main(self, testData, testPath, rpc):
         iceBoxCmd = ['/opt/Ice-3.4.1/bin/icebox', '--Ice.Config=!!TMP!!/']
 
diff --git a/plugins/build.py b/plugins/build.py
index d97b9d9..5aa45aa 100644
--- a/plugins/build.py
+++ b/plugins/build.py
@@ -9,14 +9,14 @@
 
 '''
 
-import util
+import TestSuite
 
-class testsuite(util.TestSuiteRemoteBaseClass):
+class plugin(TestSuite.RemoteBaseClass):
     def main(self, testData, testPath, rpc):
         if not 'repo' in testData['cmd']:
             return {'success':False,'msg':'No repo specified.'}
 
-        repoInfo = util.url().fetchRepoInfo(testData['cmd']['repo'])
+        repoInfo = self.url().fetchRepoInfo(testData['cmd']['repo'])
         if repoInfo['success'] == False:
             return repoInfo
 
diff --git a/plugins/sipp.py b/plugins/sipp.py
index be5410b..55aaffa 100644
--- a/plugins/sipp.py
+++ b/plugins/sipp.py
@@ -9,9 +9,9 @@
 
 '''
 
-import util
+import TestSuite
 
-class testsuite(util.TestSuiteRemoteBaseClass):
+class testsuite(TestSuite.BaseClass):
     def main(self, testData, testPath, rpc):
         config = {}
         modes = ['uas', 'uac']
@@ -34,7 +34,7 @@ class testsuite(util.TestSuiteRemoteBaseClass):
         return {'success':True,'shutdownExempt':True}
 
     def _loadScenarioFile(self, fp, fn, rpc):
-        fd = util.file().read(fp + '/' + fn)
+        fd = self.file().read(fp + '/' + fn)
         return rpc.writeFile(fn, fd)
     
     def _execBuilder(self, list, string):
diff --git a/remote.py b/remote.py
index d930f33..d09acea 100755
--- a/remote.py
+++ b/remote.py
@@ -208,6 +208,7 @@ class RemoteManagement(object):
         w = open('%s/tmp/%s' % (cwd, fn), "wb")
         wc = w.write(fd.data)
         w.close()
+        installPath = installPath.replace('!!TMP!!', cwd)
         results = self.run('remoteSideRecvFile', 'tar', ['tar', '-xvf', '%s/tmp/%s' % (cwd, fn), '-C', '%s' % installPath], True)
         if results['success'] == False:
             return results

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


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list