[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 11:06:49 CDT 2011
branch "review" has been updated
via 479dbc2ecd18504df6d05506c64f0e21ac5d0f65 (commit)
via 2d31e67c6a1bf35260dc8756b18f4932e1ad5263 (commit)
from 911cb686ad90aa162b5c82bf7d1f06a24add7985 (commit)
Summary of changes:
events/shutdown.yaml | 19 +++++++++++--------
plugins/sipp.py | 16 ++++++++++++++++
plugins/testsuite_remotes.py | 3 +--
remote.py | 4 +++-
4 files changed, 31 insertions(+), 11 deletions(-)
- Log -----------------------------------------------------------------
commit 479dbc2ecd18504df6d05506c64f0e21ac5d0f65
Author: Darren Sessions <dsessions at digium.com>
Date: Wed Jun 8 11:06:44 2011 -0500
updated the shutdown event yaml file and the test-suite remote plugin to avoid a test failure case on shutdown as I currently have nothing set to run during the test-suite shutdown.
diff --git a/events/shutdown.yaml b/events/shutdown.yaml
index 9d98644..919dc2d 100644
--- a/events/shutdown.yaml
+++ b/events/shutdown.yaml
@@ -1,10 +1,13 @@
-name : Shutdown Remotes
+name : Cleanup
+options :
+ stop_tests_on_failure : True
tests :
- - remoteShutdown :
+ - shutdown :
timeline:
- - remoteShutdown :
- remotes :
- testsuite-remote-1.digium.internal
- testsuite-remote-2.digium.internal
- testsuite-remote-3.digium.internal
- testsuite-builder-1.digium.internal
+ - testsuite_remotes :
+ cmd :
+ cleanup :
+ - testsuite-remote-1.digium.internal
+ - testsuite-remote-2.digium.internal
+ - testsuite-remote-3.digium.internal
+ - testsuite-builder-1.digium.internal
diff --git a/plugins/testsuite_remotes.py b/plugins/testsuite_remotes.py
index 0d0acfc..f0fbfa1 100644
--- a/plugins/testsuite_remotes.py
+++ b/plugins/testsuite_remotes.py
@@ -38,8 +38,7 @@ class plugin(TestSuite.BaseClass):
results = rpc[remote]['rpc']('makeDir', '!!TMP!!/artifacts')
if results['success'] == False:
return results
-
- elif cmd == 'shutdown':
+ elif cmd == 'cleanup':
print 'shutdown'
else:
return {'success':False,'msg':'The %s command is invalid.' % cmd}
commit 2d31e67c6a1bf35260dc8756b18f4932e1ad5263
Author: Darren Sessions <dsessions at digium.com>
Date: Wed Jun 8 11:05:08 2011 -0500
added support for return codes in the remotes when executing system calls. added support in the sipp plugin to parse the return codes and return the appropriate message.
diff --git a/plugins/sipp.py b/plugins/sipp.py
index 535981c..15b10d4 100644
--- a/plugins/sipp.py
+++ b/plugins/sipp.py
@@ -37,6 +37,22 @@ class plugin(TestSuite.RemoteBaseClass):
results = remote['rpc']('run', globalVars, 'sipp', mode, self._componentConfig(mode, config[mode], testPath, remote, testData['testsuite_remote_host']), waitForPidToFinish)
if results['success'] == False:
return results
+ if mode == 'uac':
+ print results
+ if results['returncode'] == 1:
+ results['msg'] = 'At least one call failed.'
+ elif results['returncode'] == 97:
+ results['msg'] = 'exit on internal command. calls may have been processed.'
+ elif results['returncode'] == 99:
+ results['msg'] = 'Normal exit without any calls processed.'
+ elif results['returncode'] == -1:
+ results['msg'] = 'Fatal error.'
+ elif results['returncode'] == -2:
+ results['msg'] = 'Fatal error binding a socket.'
+
+ if not results['returncode'] == 0:
+ results['success'] = False
+ return results
return {'success':True}
diff --git a/remote.py b/remote.py
index 6ca1736..c980da0 100755
--- a/remote.py
+++ b/remote.py
@@ -86,8 +86,10 @@ class RemoteManagement(object):
if wait == True:
p.wait()
os.chdir('%s' % cwd)
- if p.returncode:
+ if not p.returncode == None and wait == False:
return {'success':False,"msg":"[run] Could not execute '%s'." % ' '.join(execCmd)}
+ elif not p.returncode == None and wait == True:
+ return {'success':True, 'returncode':p.returncode}
else:
return {'success':False,"msg":"[run] FAILED TO EXECUTE '%s', it must exist and be executable" % ' '.join(execCmd)}
-----------------------------------------------------------------------
--
asterisk-scf/integration/testsuite.git
More information about the asterisk-scf-commits
mailing list