Changeset 605
- Timestamp:
- Oct 13, 2007 4:44:38 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/testScripts/nightlyBuild.py
r604 r605 9 9 10 10 # TODO: 11 # If project does not exist, then "svn co". 12 # If did "svn co" then get all 3rd party packages. 13 # Get some information about the platform and put this in email failure message. 14 # Implement Kipp's vpath (delete vpath instead of 'make distclean'). 15 # Get miplib3 and netlib files with seperate checkout. 11 # -After "svn co" then get all 3rd party packages. 12 # -Get some information about the platform and put this in email failure message. 13 # -Implement Kipp's vpath (delete vpath instead of 'make distclean'). 16 14 # Break this file up into multiple files so it is manageable. 17 # Don't do build if 'svn update' does change anything and prior test was OK.15 # Don't do build if 'svn update' doesn't change anything and prior test was OK. 18 16 # (no need to re-run if nothing has changed since prior run) 19 # Allow pw file to be in same directory as script or other locations.20 # Add server and login name to pw file?21 17 # Build both trunk and latest stable 22 18 # Build both optimized and debug (or have a set of config-site scripts to test?) 19 # Check the testing of the success criteria of each projects "make test" 23 20 # Implement "cbc -miplib" test for successful run. JohnF sent JP the criteria 24 21 # to test on in an email dated 10/12/2007 12:01pm … … 32 29 33 30 #---------------------------------------------------------------------- 34 # PASSWORD_FILENAME: name of file containing smtp password 35 #---------------------------------------------------------------------- 36 PASSWORD_FILENAME = '/home/jp/bin/smtpPwFile' 37 31 # Values for sending mail: 32 # SMTP_SERVER_NAME: name of smtp server 33 # SMTP_USER_NAME: name of authorized user on server 34 # SMTP_PASSWORD_FILENAME: name of file containing smtp user's password 35 # SENDER_EMAIL_ADDR: email sent by this script will be from this address 36 # MY_EMAIL_ADDR: All problems detected by the script will be sent to 37 # this email address. The intention is for this to be 38 # the email address of the person running this script 39 # SEND_MAIL_TO_PROJECT_MANAGER: 0 or 1. If 1 then any problems 40 # detected are sent to MY_EMAIL_ADDRESS and the 41 # project manager. 42 #---------------------------------------------------------------------- 43 SMTP_SERVER_NAME = 'outgoing.verizon.net' 44 SMTP_USER_NAME = 'jpfasano' 45 SMTP_PASSWORD_FILENAME = '/home/jp/bin/smtpPwFile' 46 SENDER_EMAIL_ADDR='jpfasano _AT_ verizon _DOT_ net' 47 MY_EMAIL_ADDR='jpfasano _AT_ us _DOT_ ibm _DOT_ com' 48 SEND_MAIL_TO_PROJECT_MANAGER=0 49 #SMTP_SERVER_NAME = 'gsbims.chicagogsb.edu' 50 51 52 #---------------------------------------------------------------------- 53 # List of Projects to be processed by script 54 #---------------------------------------------------------------------- 38 55 PROJECTS = ['CoinUtils','DyLP','Clp','SYMPHONY','Vol','Osi','Cgl','Cbc','Ipopt','OS','CppAD'] 39 56 57 #---------------------------------------------------------------------- 40 58 PROJECT_EMAIL_ADDRS = {} 41 59 UNITTEST_DIR = {} … … 43 61 ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS = {} 44 62 45 #PROJECT_EMAIL_ADDRS['CoinUtils'] = 'ladanyi _AT_ us _DOT_ ibm _DOT_ com' 63 #---------------------------------------------------------------------- 64 PROJECT_EMAIL_ADDRS['CoinUtils'] = 'ladanyi _AT_ us _DOT_ ibm _DOT_ com' 46 65 ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['CoinUtils'] = ['make test'] 47 66 48 #PROJECT_EMAIL_ADDRS['DyLP'] = 'lou _AT_ cs _DOT_ sfu _DOT_ ca' 67 #---------------------------------------------------------------------- 68 PROJECT_EMAIL_ADDRS['DyLP'] = 'lou _AT_ cs _DOT_ sfu _DOT_ ca' 49 69 UNITTEST_DIR['DyLP'] = os.path.join('Osi','test') 50 70 UNITTEST_CMD['DyLP'] = './unitTest -testOsiSolverInterface -netlibDir=_NETLIBDIR_ -cerr2cout' 51 71 ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['DyLP'] = ['make test'] 52 72 53 #PROJECT_EMAIL_ADDRS['Clp'] = 'jjforre _AT_ us _DOT_ ibm _DOT_ com' 73 #---------------------------------------------------------------------- 74 PROJECT_EMAIL_ADDRS['Clp'] = 'jjforre _AT_ us _DOT_ ibm _DOT_ com' 54 75 UNITTEST_DIR['Clp'] = os.path.join('Clp','src') 55 76 UNITTEST_CMD['Clp'] = './clp -unitTest -netlib dirNetlib=_NETLIBDIR_' 56 77 ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['Clp'] = ['make test',UNITTEST_CMD['Clp']] 57 78 58 #PROJECT_EMAIL_ADDRS['SYMPHONY'] = 'tkr2 _AT_ lehigh _DOT_ edu' 79 #---------------------------------------------------------------------- 80 PROJECT_EMAIL_ADDRS['SYMPHONY'] = 'tkr2 _AT_ lehigh _DOT_ edu' 59 81 ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['SYMPHONY'] = ['make test'] 60 82 61 #PROJECT_EMAIL_ADDRS['Vol'] = 'barahon _AT_ us _DOT_ ibm _DOT_ com' 62 63 #PROJECT_EMAIL_ADDRS['Osi'] = 'mjs _AT_ ces _DOT_ clemson _DOT_ edu' 83 #---------------------------------------------------------------------- 84 PROJECT_EMAIL_ADDRS['Vol'] = 'barahon _AT_ us _DOT_ ibm _DOT_ com' 85 86 #---------------------------------------------------------------------- 87 PROJECT_EMAIL_ADDRS['Osi'] = 'mjs _AT_ ces _DOT_ clemson _DOT_ edu' 64 88 UNITTEST_DIR['Osi'] = os.path.join('Osi','test') 65 89 UNITTEST_CMD['Osi'] = './unitTest -testOsiSolverInterface' … … 67 91 ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['Osi'] = ['make test',UNITTEST_CMD['Osi']] 68 92 69 #PROJECT_EMAIL_ADDRS['Cgl'] = 'robinlh _AT_ us _DOT_ ibm _DOT_ com' 93 #---------------------------------------------------------------------- 94 PROJECT_EMAIL_ADDRS['Cgl'] = 'robinlh _AT_ us _DOT_ ibm _DOT_ com' 70 95 ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['Cgl'] = ['make test'] 71 96 72 #PROJECT_EMAIL_ADDRS['Cbc'] = 'jjforre _AT_ us _DOT_ ibm _DOT_ com' 97 #---------------------------------------------------------------------- 98 PROJECT_EMAIL_ADDRS['Cbc'] = 'jjforre _AT_ us _DOT_ ibm _DOT_ com' 73 99 ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['Cbc'] = ['make test'] 74 100 75 #PROJECT_EMAIL_ADDRS['Ipopt'] = 'andreasw _AT_ us _DOT_ ibm _DOT_ com' 76 #PROJECT_EMAIL_ADDRS['OS'] = 'kipp _DOT_ martin _AT_ chicagogsb _DOT_ edu' 77 #PROJECT_EMAIL_ADDRS['CppAD'] = 'bradbell _AT_ washington _DOT_ edu' 101 #---------------------------------------------------------------------- 102 PROJECT_EMAIL_ADDRS['Ipopt'] = 'andreasw _AT_ us _DOT_ ibm _DOT_ com' 103 104 #---------------------------------------------------------------------- 105 PROJECT_EMAIL_ADDRS['OS'] = 'kipp _DOT_ martin _AT_ chicagogsb _DOT_ edu' 106 107 #---------------------------------------------------------------------- 108 PROJECT_EMAIL_ADDRS['CppAD'] = 'bradbell _AT_ washington _DOT_ edu' 78 109 79 110 #------------------------------------------------------------------------ … … 82 113 def sendmail(project,cmdMsgs,cmd): 83 114 curDir = os.getcwd() 84 smtpserver = 'outgoing.verizon.net'85 #smtpserver = 'gsbims.chicagogsb.edu'86 smtpuser = 'jpfasano'87 115 88 116 # Get smpt server password 89 if os.path.isfile( PASSWORD_FILENAME) :90 pwFilePtr = open( PASSWORD_FILENAME,'r')117 if os.path.isfile(SMTP_PASSWORD_FILENAME) : 118 pwFilePtr = open(SMTP_PASSWORD_FILENAME,'r') 91 119 smtppass = pwFilePtr.read().strip() 92 120 pwFilePtr.close() 93 121 else : 94 writeLogMessage( "Failure reading pwFileName=" + pwFileName ) 95 sender = unscrambleEmailAddress('jpfasano _AT_ verizon _DOT_ net') 96 toAddrs = [unscrambleEmailAddress('jpfasano _AT_ us _DOT_ ibm _DOT_ com')] 97 if PROJECT_EMAIL_ADDRS.has_key(project) : 122 writeLogMessage( "Failure reading pwFileName=" + SMTP_PASSWORD_FILENAME ) 123 print cmdMsgs 124 sys.exit(1) 125 sender = unscrambleEmailAddress(SENDER_EMAIL_ADDR) 126 toAddrs = [unscrambleEmailAddress(MY_EMAIL_ADDR)] 127 if PROJECT_EMAIL_ADDRS.has_key(project) and SEND_MAIL_TO_PROJECT_MANAGER: 98 128 toAddrs.append(unscrambleEmailAddress(PROJECT_EMAIL_ADDRS[project])) 99 session = smtplib.SMTP( smtpserver)100 session.login( smtpuser,smtppass)129 session = smtplib.SMTP(SMTP_SERVER_NAME) 130 session.login(SMTP_USER_NAME,smtppass) 101 131 subject = project + " build problem when running '" + cmd +"'" 102 132 msgWHeader = ("From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" … … 163 193 rc=commands.getstatusoutput(svnCmd) 164 194 if rc[0] != 0 : 165 sendmail(p ,rc[1],svnCmd)195 sendmail(project,rc[1],svnCmd) 166 196 retVal='Error' 167 197 return retVal
Note: See TracChangeset
for help on using the changeset viewer.