Changeset 615 for branches/testScripts


Ignore:
Timestamp:
Oct 15, 2007 11:19:25 AM (12 years ago)
Author:
jpfasano
Message:

Added logMessages module(file).
Set nightlyBuild.py property to be executable.

Location:
branches/testScripts
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/testScripts/nightlyBuild.py

    • Property svn:eol-style set to native
    • Property svn:executable set to *
    r614 r615  
    66import smtplib
    77import re
    8 import time
    98
    109import NBuserConfig
    1110import NBprojectConfig
     11import NBlogMessages
    1212
    1313# TODO:
     
    4747  emailMsg += cmdMsgs
    4848  sendEmail(toAddrs,subject,emailMsg)
    49   writeLogMessage( "  email sent regarding "+project+" running '"+cmd+"'" )
     49  NBlogMessages.writeMessage( "  email sent regarding "+project+" running '"+cmd+"'" )
    5050
    5151#------------------------------------------------------------------------
     
    6565    pwFilePtr.close()
    6666  else :
    67     writeLogMessage( "Failure reading pwFileName=" + NBuserConfig.SMTP_PASSWORD_FILENAME )
     67    NBlogMessages.writeMessage( "Failure reading pwFileName=" + NBuserConfig.SMTP_PASSWORD_FILENAME )
    6868    sys.exit(1)
    6969   
     
    7878  rc = session.sendmail(sender,toAddrs,msgWHeader)
    7979  if rc!={} :
    80     writeLogMessage( 'session.sendmail rc='  )
    81     writeLogMessage( rc )
     80    NBlogMessages.writeMessage( 'session.sendmail rc='  )
     81    NBlogMessages.writeMessage( rc )
    8282  session.quit()
    8383
     
    140140  retVal='OK'
    141141  os.chdir(dir)
    142   writeLogMessage('  '+svnCmd)
     142  NBlogMessages.writeMessage('  '+svnCmd)
    143143  rc=commands.getstatusoutput(svnCmd)
    144144  if rc[0] != 0 :
     
    146146    retVal='Error'
    147147  return retVal
    148 
    149 #------------------------------------------------------------------------
    150 # Function to write log messages
    151 #------------------------------------------------------------------------
    152 def writeLogMessage( msg ) :
    153   logMsg = time.ctime(time.time())+': '
    154   logMsg += msg
    155   print logMsg
    156148
    157149#------------------------------------------------------------------------
     
    188180#------------------------------------------------------------------------
    189181for p in NBuserConfig.PROJECTS:
    190   writeLogMessage( p )
     182  NBlogMessages.writeMessage( p )
    191183  rc = [0]
    192184
     
    218210  os.chdir(projectCheckOutDir)
    219211  configCmd = os.path.join('.','configure -C')
    220   writeLogMessage('  '+configCmd)
     212  NBlogMessages.writeMessage('  '+configCmd)
    221213  rc=commands.getstatusoutput(configCmd)
    222214 
     
    237229  # Run make part of buid
    238230  #---------------------------------------------------------------------
    239   writeLogMessage( '  make' )
     231  NBlogMessages.writeMessage( '  make' )
    240232  rc=commands.getstatusoutput('make')
    241233 
     
    248240  # Run 'make test' part of buid
    249241  #---------------------------------------------------------------------
    250   writeLogMessage( '  make test' )
     242  NBlogMessages.writeMessage( '  make test' )
    251243  rc=commands.getstatusoutput('make test')
    252244 
     
    267259    unitTestCmd=unitTestCmd.replace('_MIPLIB3DIR_',miplib3Dir)
    268260
    269     writeLogMessage( '  '+unitTestCmd )
     261    NBlogMessages.writeMessage( '  '+unitTestCmd )
    270262    rc=commands.getstatusoutput(unitTestCmd)
    271263 
     
    278270
    279271
    280 writeLogMessage( "nightlyBuild.py Finished" )
     272NBlogMessages.writeMessage( "nightlyBuild.py Finished" )
    281273
    282274sys.exit(0)
     
    322314  pwFilePtr.close()
    323315else :
    324   #writeLogMessage( "Failure reading pwFileName=" + CONFIG_FILENAME )
     316  #NBlogMessages.writeMessage( "Failure reading pwFileName=" + CONFIG_FILENAME )
    325317  #print cmdMsgs
    326318  sys.exit( 1)
     
    367359  pwFilePtr.close()
    368360else :
    369   #writeLogMessage( "Failure reading pwFileName=" + CONFIG_FILENAME )
     361  #NBlogMessages.writeMessage( "Failure reading pwFileName=" + CONFIG_FILENAME )
    370362  #print cmdMsgs
    371363  sys.exit( 1)
Note: See TracChangeset for help on using the changeset viewer.