Changeset 631
- Timestamp:
- Oct 17, 2007 12:56:13 PM (13 years ago)
- Location:
- branches/testScripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/testScripts/NBosCommand.py
r629 r631 1 1 #! /usr/bin/env python 2 2 3 import subprocess 3 from socket import gethostname 4 4 5 5 #------------------------------------------------------------------------ … … 9 9 #------------------------------------------------------------------------ 10 10 def run(cmd) : 11 p=subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) 12 cmdStdout,cmdStderr=p.communicate() 13 cmdRc=p.returncode 14 retVal = { 'returnCode':cmdRc, 'stdout':cmdStdout, 'stderr':cmdStderr } 15 return retVal 11 12 if gethostname()=='math01.watson.ibm.com' : 13 14 # this machine has a back level of python, so must use an older 15 # techniques to implement this function. This implementation 16 # runs the command in the same process as the script. 17 # This has the problem that if the command crashes, it will bring 18 # down the script. Another problem is that stderr and stdout are 19 # mingled together 20 21 import commands 22 result = commands.getstatusoutput(cmd) 23 retVal = { 'returnCode':result[0], 'stdout':result[1], 'stderr':'' } 24 return retVal 25 26 else : 27 28 import subprocess 29 30 p=subprocess.Popen(cmd,shell=True,\ 31 stdout=subprocess.PIPE,\ 32 stderr=subprocess.PIPE) 33 cmdStdout,cmdStderr=p.communicate() 34 cmdRc=p.returncode 35 retVal = { 'returnCode':cmdRc, 'stdout':cmdStdout, 'stderr':cmdStderr } 36 return retVal 16 37 17 38 -
branches/testScripts/NBuserConfig.py
r630 r631 19 19 elif gethostname()=='math01.watson.ibm.com' : 20 20 NIGHTLY_BUILD_ROOT_DIR = '/u/jpfasano/COIN/nbTest' 21 elif gethostname()=='kmartin-maclt.local' : 22 NIGHTLY_BUILD_ROOT_DIR = '/Users/kmartin/COIN' 21 23 else : 22 NIGHTLY_BUILD_ROOT_DIR = ' /Users/kmartin/COIN'24 NIGHTLY_BUILD_ROOT_DIR = 'xxx' 23 25 24 SVNPATH_PREFIX='' 25 26 #---------------------------------------------------------------------- 27 # Define directory where svn is located. 28 # If svn is in the default path, then this can be set to an empty string 29 #---------------------------------------------------------------------- 30 if gethostname()=='math01.watson.ibm.com' : 31 SVNPATH_PREFIX='/gsa/yktgsa/projects/o/oslos/local/bin' 32 elif gethostname()=='kmartin-maclt.local' : 33 SVNPATH_PREFIX='/usr/local/bin/' 34 else : 35 SVNPATH_PREFIX='' 36 26 37 27 38 #---------------------------------------------------------------------- … … 63 74 MY_EMAIL_ADDR='jpfasano _AT_ us _DOT_ ibm _DOT_ com' 64 75 SEND_MAIL_TO_PROJECT_MANAGER=0 65 el se:76 elif gethostname()=='kmartin-maclt.local' : 66 77 SMTP_SERVER_NAME = 'gsbims.uchicago.edu' 67 78 SMTP_SERVER_PORT =587 … … 73 84 MY_EMAIL_ADDR='kipp _DOT_ martin _AT_ chicagogsb _DOT_ edu' 74 85 SEND_MAIL_TO_PROJECT_MANAGER=0 75 SVNPATH_PREFIX='/usr/local/bin/' 86 else : 87 SMTP_SERVER_NAME = 'xxx.smtp.server.name' 88 SMTP_SERVER_PORT =25 89 SMTP_SSL_SERVER = 0 90 SMTP_USER_NAME = 'xxxx' 91 SMTP_PASSWORD_FILENAME = '/xxx/yyy/smtpPassWordFile' 92 93 SENDER_EMAIL_ADDR='xxx _AT_ yyyy _DOT_ edu' 94 MY_EMAIL_ADDR='xxx _AT_ yyyy _DOT_ edu' 95 SEND_MAIL_TO_PROJECT_MANAGER=0 76 96 77 97
Note: See TracChangeset
for help on using the changeset viewer.