[asterisk-scf-commits] asterisk-scf/release/testsuite.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Wed May 16 13:08:15 CDT 2012
branch "master" has been updated
via 8d2f7ff9582b0385440d4576b1d21ca1cc136826 (commit)
via 08e7672864f8c15256da6d5b3dc4fe718cbb2265 (commit)
from 45aae1456c7662e30d60e9a81e7f7e0081460b46 (commit)
Summary of changes:
lib/python/SubProcess.py | 17 ++++++++++++-----
tests/build/asterisk_scf/testcase.yaml | 8 +++++---
2 files changed, 17 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit 8d2f7ff9582b0385440d4576b1d21ca1cc136826
Author: Darren Sessions <dsessions at digium.com>
Date: Wed May 16 11:23:36 2012 -0500
Added more granular return code checking / option return code checking in the run function within the subprocess module. This is required in order to better detect if a process has exited out with an error after executing and also provides for running things like pkill that will return 1 if no processes as specified in args are running which is intended behavior.
diff --git a/lib/python/SubProcess.py b/lib/python/SubProcess.py
index c9b6143..5592889 100644
--- a/lib/python/SubProcess.py
+++ b/lib/python/SubProcess.py
@@ -36,7 +36,7 @@ class Exec(Misc.Utils, Logging.Artifacts):
else:
return res
- def run(self, plugin, label, execCmd, wait=False):
+ def run(self, plugin, label, execCmd, wait=False, checkReturnCode=True):
if plugin in globalVars.processList:
if label in globalVars.processList[plugin]:
return self.resFailure('%s executed by the %s plugin is already running.' % (label, plugin))
@@ -58,12 +58,19 @@ class Exec(Misc.Utils, Logging.Artifacts):
p = subprocess.Popen(execCmd, bufsize=0, shell=False, stdout=logFileObject, stderr=logFileObject, env=globalVars.env)
time.sleep(.5)
p.poll()
+
if wait == True:
p.wait()
- if not p.returncode == None and wait == False:
- return self.resFailure('Could not execute \'%s\'.' % ' '.join(execCmd))
- elif not p.returncode == None and wait == True:
- return {'success':True, 'returncode':p.returncode, 'logFilePath':logFilePath}
+
+ if checkReturnCode == True:
+ if (not p.returncode == None and not p.returncode == 1) and wait == False:
+ return self.resFailure('Could not execute \'%s\'.' % ' '.join(execCmd))
+ elif wait == True and checkReturnCode == True:
+ returnMsg = {}
+ if (not p.returncode == None and not p.returncode == 1):
+ return {'success':True, 'returncode':p.returncode, 'logFilePath':logFilePath}
+ else:
+ return {'success':False, 'returncode':p.returncode, 'logFilePath':logFilePath, 'msg':'Could not execute \'%s\'.' % ' '.join(execCmd)}
else:
return self.resFailure('FAILED TO EXECUTE \'%s\'! It must exist and be executable!' % ' '.join(execCmd))
commit 08e7672864f8c15256da6d5b3dc4fe718cbb2265
Author: Darren Sessions <dsessions at digium.com>
Date: Tue May 15 10:55:50 2012 -0500
Added the -j jobs option to the build process to fully utilize the current testsuite build slave cpu resources.
diff --git a/tests/build/asterisk_scf/testcase.yaml b/tests/build/asterisk_scf/testcase.yaml
index d0b9d1f..8290818 100644
--- a/tests/build/asterisk_scf/testcase.yaml
+++ b/tests/build/asterisk_scf/testcase.yaml
@@ -7,12 +7,12 @@ tests :
- build :
remote_agent : [galway.digium.internal, public1, ipv4]
cmd :
- pull_update : True
+ pull_update : False
dl_type : git
dl_url : 'git://git.asterisk.org/asterisk-scf/release/ice'
cd : ice/cpp
make_cmd :
- - make
+ - make -j8
- make install
- ice_python :
timeline :
@@ -64,7 +64,9 @@ tests :
- ./gitall-asterisk-scf.sh
#- rm -rf build
- cmake/init-cmake.sh
- - cmake --build ./build
+ - cd gitall/build
+ - make -j8
+ #- cmake --build ./build
redistribute :
remotes :
- testsuite-remote-1.digium.internal
-----------------------------------------------------------------------
--
asterisk-scf/release/testsuite.git
More information about the asterisk-scf-commits
mailing list