[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 Jun 8 21:41:05 CDT 2011
branch "review" has been updated
via eb5d095f821ae108e2c4e0b946e89fb2b6bf88c6 (commit)
via b05cde1afcb0e7d08bbdadff1c2c8644157f9fa7 (commit)
via 85e8960cfea4499df74961e2caad992f2a6e6fb0 (commit)
from fa256937d128848668694ad7a2fa50428e1f3108 (commit)
Summary of changes:
lib/python/TestSuite.py | 2 +-
plugins/wireshark.py | 8 ++++++--
remote.py | 16 ++++------------
3 files changed, 11 insertions(+), 15 deletions(-)
- Log -----------------------------------------------------------------
commit eb5d095f821ae108e2c4e0b946e89fb2b6bf88c6
Author: Darren Sessions <dsessions at digium.com>
Date: Wed Jun 8 21:40:52 2011 -0500
converted the move function to use the shutil plugin instead of making a system call which eliminates the need a system call.
diff --git a/remote.py b/remote.py
index 8e8d1e7..fdf46ac 100755
--- a/remote.py
+++ b/remote.py
@@ -175,19 +175,11 @@ class RemoteManagement(object):
shutil.rmtree('%s/tmp/%s' % (cwd, dir))
return {'success':True}
- def moveFile(self, fp, dp):
- fp = self._filePathCheck(fp)
- dp = self._filePathCheck(dp)
- if not os.path.exists('%s/tmp/build/%s' % (cwd, fp)):
- return {'success':False,'msg':'[moveFile] The %s source path does not exist.' % fp}
- if not os.path.exists('%s/tmp/build/%s' % (cwd, dp)):
- return {'success':False,'msg':'[moveFile] The %s destination path does not exist.' % dp}
+ def moveFile(self, src, dst):
try:
- returncode = subprocess.call('mv %s/tmp/build/%s %s/tmp/build/%s' % (cwd, fp, cwd, dp))
- if returncode != 0:
- return {'success':False,'msg':'[moveFile] The move command failed. (return code %d)' % returncode}
- except OSError, e:
- return {'success':False,'msg':'[moveFile] Execution failed: %s' % e}
+ shutil.move(src, dst)
+ except:
+ return {'success':False,'msg':'[moveFile] Execution failed: %s' % sys.exc_info()[1]}
return {'success':True}
def removeFile(self, fn):
commit b05cde1afcb0e7d08bbdadff1c2c8644157f9fa7
Author: Darren Sessions <dsessions at digium.com>
Date: Wed Jun 8 21:39:42 2011 -0500
modified the wireshark plugin to correct an issue with the pcap file generation on the slower aa65s so the system doesnt slow to a crawl during a capture
diff --git a/plugins/wireshark.py b/plugins/wireshark.py
index 7409b38..f247f2f 100644
--- a/plugins/wireshark.py
+++ b/plugins/wireshark.py
@@ -41,12 +41,16 @@ class plugin(TestSuite.RemoteBaseClass):
runCmd = [
'tshark',
'-w',
- '!!TMP!!/artifacts/%s/%s.capture.pcap' % (globalVars['testInfo']['testPath'], remote['hostname']),
+ '/tmp/capture.pcap',
'-R',
- "'(%s) and (%s)'" % (protocolFilters, hostFilters)]
+ '(%s) and (%s)' % (protocolFilters, hostFilters)]
results = remote['rpc']('run', globalVars, 'wireshark', 'start', runCmd)
if results['success'] == False:
return results
+ results = remote['rpc']('moveFile', '/tmp/capture.pcap', '!!TMP!!/artifacts/%s/%s.capture.pcap' % (globalVars['testInfo']['testPath'], remote['hostname']))
+ if results['success'] == False:
+ return results
+
return {'success':True}
commit 85e8960cfea4499df74961e2caad992f2a6e6fb0
Author: Darren Sessions <dsessions at digium.com>
Date: Wed Jun 8 21:37:42 2011 -0500
changed the hostname returned in the rpc connect to exclude the domain name in order to make file names and other identifiable information that is produced to have shorter names.
diff --git a/lib/python/TestSuite.py b/lib/python/TestSuite.py
index 0a3b140..5dbd9e3 100644
--- a/lib/python/TestSuite.py
+++ b/lib/python/TestSuite.py
@@ -77,7 +77,7 @@ class utils():
except:
return {'success':False,'msg':'Connection to %s was refused.' % self.host}
ipv4, ipv6 = self.rpc[self.host].whatAreMyIps()
- return {'success':True, 'rpc':self.cmd, 'ipv4':ipv4, 'ipv6':ipv6, 'hostname':self.host}
+ return {'success':True, 'rpc':self.cmd, 'ipv4':ipv4, 'ipv6':ipv6, 'hostname':self.host.split('.')[0]}
def cmd(self, cmd, *args):
try:
-----------------------------------------------------------------------
--
asterisk-scf/integration/testsuite.git
More information about the asterisk-scf-commits
mailing list