Ignore:
Timestamp:
Oct 26, 2007 8:05:03 AM (13 years ago)
Author:
stefan
Message:

extend email-message; and a bit more cleaning and bugfixing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/testScripts/NBemail.py

    r681 r702  
    2222#       "make".
    2323#  cmdMsgs: the messages generated by cmd.  This will typically contain
    24 #       errors issued by cmd.
     24#       errors issued by cmd and additional information about the build.
    2525#------------------------------------------------------------------------
    2626def sendCmdMsgs(project,cmdMsgs,cmd):
    2727  curDir = os.getcwd()
    28  
     28
    2929  toAddrs = [unscrambleAddress(NBuserConfig.MY_EMAIL_ADDR)]
    3030  if NBprojectConfig.PROJECT_EMAIL_ADDRS.has_key(project) \
     
    3535    toAddrs.append(unscrambledEmailAddress)
    3636
    37   subject = "NightlyBuild: "+project + " problem when running '" + cmd +"'"
     37  subject = "NightlyBuild: problem with project "+project+" when running '" + cmd +"'"
    3838
    39   emailMsg  = "'" + cmd + "' from directory " + curDir + " failed.\n\n"
     39  emailMsg = "Dear projectmanager,\n\n" \
     40   +"the nightly build tests scripts have recognized a failure when building project "+project+". The failing command was\n\n\t"+cmd+"\n\n" \
     41   +"Details on the problem can be found below.\n" \
     42   +"You will also get a failure message if the build of your project failed because of problems with a depending projects (externals).\n" \
     43   +"We hope you find this report useful.\n\n"
    4044
    4145  emailMsg += "Operating System: "+sys.platform+" "+os.name+"\n"
    4246  emailMsg += "Host name: "+gethostname()+"\n"
    4347
     48  if os.environ.has_key("HOSTTYPE") :
     49    emailMsg += "Host type: "+os.environ["HOSTTYPE"]+"\n"
    4450  if os.environ.has_key("PROCESSOR_IDENTIFIER") :
    4551    emailMsg += "Processor: "+os.environ["PROCESSOR_IDENTIFIER"]+"\n"
    46                                          
    4752  if os.environ.has_key("NUMBER_OF_PROCESSORS") :
    4853    emailMsg += "Number of processors: "+os.environ["NUMBER_OF_PROCESSORS"]+"\n"
    49    
     54
    5055  if os.environ.has_key("PATH") :
    5156    emailMsg += "PATH: "+os.environ["PATH"]+"\n"
     57
     58  emailMsg += "Directory: "+curDir+'\n'
     59
     60  if cmdMsgs.has_key("configure flags") :
     61    emailMsg += "Flags for configure: "+cmdMsgs['configure flags']+'\n'
    5262
    5363  if cmdMsgs.has_key('make test') :
Note: See TracChangeset for help on using the changeset viewer.