Changeset 605 for branches


Ignore:
Timestamp:
Oct 13, 2007 4:44:38 PM (12 years ago)
Author:
jpfasano
Message:

Mostly worked on comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/testScripts/nightlyBuild.py

    r604 r605  
    99
    1010# 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').
    1614#   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.
    1816#     (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?
    2117#   Build both trunk and latest stable
    2218#   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"
    2320#   Implement "cbc -miplib" test for successful run.  JohnF sent JP the criteria
    2421#     to test on in an email dated 10/12/2007 12:01pm
     
    3229
    3330#----------------------------------------------------------------------
    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#----------------------------------------------------------------------
     43SMTP_SERVER_NAME = 'outgoing.verizon.net'
     44SMTP_USER_NAME = 'jpfasano'
     45SMTP_PASSWORD_FILENAME = '/home/jp/bin/smtpPwFile'
     46SENDER_EMAIL_ADDR='jpfasano _AT_ verizon _DOT_ net'
     47MY_EMAIL_ADDR='jpfasano _AT_ us _DOT_ ibm _DOT_ com'
     48SEND_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#----------------------------------------------------------------------
    3855PROJECTS = ['CoinUtils','DyLP','Clp','SYMPHONY','Vol','Osi','Cgl','Cbc','Ipopt','OS','CppAD']
    3956
     57#----------------------------------------------------------------------
    4058PROJECT_EMAIL_ADDRS = {}
    4159UNITTEST_DIR = {}
     
    4361ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS = {}
    4462
    45 #PROJECT_EMAIL_ADDRS['CoinUtils'] = 'ladanyi _AT_ us _DOT_ ibm _DOT_ com'
     63#----------------------------------------------------------------------
     64PROJECT_EMAIL_ADDRS['CoinUtils'] = 'ladanyi _AT_ us _DOT_ ibm _DOT_ com'
    4665ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['CoinUtils'] = ['make test']
    4766
    48 #PROJECT_EMAIL_ADDRS['DyLP'] = 'lou _AT_ cs _DOT_ sfu _DOT_ ca'
     67#----------------------------------------------------------------------
     68PROJECT_EMAIL_ADDRS['DyLP'] = 'lou _AT_ cs _DOT_ sfu _DOT_ ca'
    4969UNITTEST_DIR['DyLP'] = os.path.join('Osi','test')
    5070UNITTEST_CMD['DyLP'] = './unitTest -testOsiSolverInterface -netlibDir=_NETLIBDIR_ -cerr2cout'
    5171ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['DyLP'] = ['make test']
    5272
    53 #PROJECT_EMAIL_ADDRS['Clp'] = 'jjforre _AT_ us _DOT_ ibm _DOT_ com'
     73#----------------------------------------------------------------------
     74PROJECT_EMAIL_ADDRS['Clp'] = 'jjforre _AT_ us _DOT_ ibm _DOT_ com'
    5475UNITTEST_DIR['Clp'] = os.path.join('Clp','src')
    5576UNITTEST_CMD['Clp'] = './clp -unitTest -netlib dirNetlib=_NETLIBDIR_'
    5677ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['Clp'] = ['make test',UNITTEST_CMD['Clp']]
    5778
    58 #PROJECT_EMAIL_ADDRS['SYMPHONY'] = 'tkr2 _AT_ lehigh _DOT_ edu'
     79#----------------------------------------------------------------------
     80PROJECT_EMAIL_ADDRS['SYMPHONY'] = 'tkr2 _AT_ lehigh _DOT_ edu'
    5981ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['SYMPHONY'] = ['make test']
    6082
    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#----------------------------------------------------------------------
     84PROJECT_EMAIL_ADDRS['Vol'] = 'barahon _AT_ us _DOT_ ibm _DOT_ com'
     85
     86#----------------------------------------------------------------------
     87PROJECT_EMAIL_ADDRS['Osi'] = 'mjs _AT_ ces _DOT_ clemson _DOT_ edu'
    6488UNITTEST_DIR['Osi'] = os.path.join('Osi','test')
    6589UNITTEST_CMD['Osi'] = './unitTest -testOsiSolverInterface'
     
    6791ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['Osi'] = ['make test',UNITTEST_CMD['Osi']]
    6892
    69 #PROJECT_EMAIL_ADDRS['Cgl'] = 'robinlh _AT_ us _DOT_ ibm _DOT_ com'
     93#----------------------------------------------------------------------
     94PROJECT_EMAIL_ADDRS['Cgl'] = 'robinlh _AT_ us _DOT_ ibm _DOT_ com'
    7095ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['Cgl'] = ['make test']
    7196
    72 #PROJECT_EMAIL_ADDRS['Cbc'] = 'jjforre _AT_ us _DOT_ ibm _DOT_ com'
     97#----------------------------------------------------------------------
     98PROJECT_EMAIL_ADDRS['Cbc'] = 'jjforre _AT_ us _DOT_ ibm _DOT_ com'
    7399ALL_TEST_COMPLETED_SUCCESSFULLY_CMDS['Cbc'] = ['make test']
    74100
    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#----------------------------------------------------------------------
     102PROJECT_EMAIL_ADDRS['Ipopt'] = 'andreasw _AT_ us _DOT_ ibm _DOT_ com'
     103
     104#----------------------------------------------------------------------
     105PROJECT_EMAIL_ADDRS['OS'] = 'kipp _DOT_ martin _AT_ chicagogsb _DOT_ edu'
     106
     107#----------------------------------------------------------------------
     108PROJECT_EMAIL_ADDRS['CppAD'] = 'bradbell _AT_ washington _DOT_ edu'
    78109
    79110#------------------------------------------------------------------------
     
    82113def sendmail(project,cmdMsgs,cmd):
    83114  curDir = os.getcwd()
    84   smtpserver = 'outgoing.verizon.net'
    85   #smtpserver = 'gsbims.chicagogsb.edu'
    86   smtpuser = 'jpfasano'
    87115 
    88116  # 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')
    91119    smtppass  = pwFilePtr.read().strip()
    92120    pwFilePtr.close()
    93121  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:
    98128    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)
    101131  subject = project + " build problem when running '" + cmd +"'"
    102132  msgWHeader = ("From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n"
     
    163193  rc=commands.getstatusoutput(svnCmd)
    164194  if rc[0] != 0 :
    165     sendmail(p,rc[1],svnCmd)
     195    sendmail(project,rc[1],svnCmd)
    166196    retVal='Error'
    167197  return retVal
Note: See TracChangeset for help on using the changeset viewer.