Changeset 618


Ignore:
Timestamp:
Oct 15, 2007 2:10:33 PM (12 years ago)
Author:
jpfasano
Message:

emailed messages now contain some information about the host machine (name
and OS).
userConfig variables are conditionally set based on hostname

Location:
branches/testScripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/testScripts/NBemail.py

    r617 r618  
    33import os
    44import sys
     5from socket import gethostname
    56import smtplib
    67
     
    3738
    3839  emailMsg  = "'" + cmd + "' from directory " + curDir + " failed.\n\n"
    39   emailMsg += "Operating System: "+os.name+"\n"
     40
     41  emailMsg += "Operating System: "+sys.platform+" "+os.name+"\n"
     42  emailMsg += "Host name: "+gethostname()+"\n\n"
     43
    4044  emailMsg += "'" + cmd + "' messages are:\n"
    4145  emailMsg += cmdMsgs
  • branches/testScripts/NBuserConfig.py

    r617 r618  
    11#! /usr/bin/env python
     2
     3from socket import gethostname
    24
    35#----------------------------------------------------------------------
     
    1214#   done. If the directory does not exist, it will be created.
    1315#----------------------------------------------------------------------
    14 NIGHTLY_BUILD_ROOT_DIR = '/home/jp/COIN'
     16if gethostname()=='ubuntu' :
     17  NIGHTLY_BUILD_ROOT_DIR = '/home/jp/COIN'
     18elif gethostname()=='math01.watson.ibm.com' :
     19  NIGHTLY_BUILD_ROOT_DIR = '/u/jpfasano/COIN/nbTest'
     20else :
     21  NIGHTLY_BUILD_ROOT_DIR = 'xxxxx'
     22 
    1523
    1624#----------------------------------------------------------------------
     
    3442#                 project manager.
    3543#----------------------------------------------------------------------
    36 #SMTP_SERVER_NAME = 'outgoing.verizon.net'
    37 #SMTP_SERVER_PORT = 25
    38 #SMTP_SSL_SERVER = 0
    39 #SMTP_USER_NAME = 'jpfasano'
     44if gethostname()=='ubuntu' or gethostname()=='math01.watson.ibm.com':
     45  #SMTP_SERVER_NAME = 'outgoing.verizon.net'
     46  #SMTP_SERVER_PORT = 25
     47  #SMTP_SSL_SERVER = 0
     48  #SMTP_USER_NAME = 'jpfasano'
    4049
    41 SMTP_SERVER_NAME = 'smtp.gmail.com'
    42 SMTP_SERVER_PORT = 587
    43 SMTP_SSL_SERVER = 1
    44 SMTP_USER_NAME = 'jpfasano _AT_ gmail _DOT_ com'
    45 SMTP_PASSWORD_FILENAME = '/home/jp/bin/smtpPwFile'
     50  SMTP_SERVER_NAME = 'smtp.gmail.com'
     51  SMTP_SERVER_PORT = 587
     52  SMTP_SSL_SERVER = 1
     53  SMTP_USER_NAME = 'jpfasano _AT_ gmail _DOT_ com'
     54  if gethostname()=='ubuntu' :
     55    SMTP_PASSWORD_FILENAME = '/home/jp/bin/smtpPwFile'
     56  else :
     57    SMTP_PASSWORD_FILENAME = '/u/jpfasan/COIN/bin/smtpPwFile'
    4658
    47 SENDER_EMAIL_ADDR='jpfasano _AT_ verizon _DOT_ net'
    48 MY_EMAIL_ADDR='jpfasano _AT_ us _DOT_ ibm _DOT_ com'
    49 SEND_MAIL_TO_PROJECT_MANAGER=0
    50 #SMTP_SERVER_NAME = 'gsbims.chicagogsb.edu'
     59  SENDER_EMAIL_ADDR='jpfasano _AT_ verizon _DOT_ net'
     60  MY_EMAIL_ADDR='jpfasano _AT_ us _DOT_ ibm _DOT_ com'
     61  SEND_MAIL_TO_PROJECT_MANAGER=0
     62else :
     63  SMTP_SERVER_NAME = 'xxxxx'
     64  SMTP_SERVER_PORT = 25
     65  SMTP_SSL_SERVER = 0
     66  SMTP_USER_NAME = 'xxxx _AT_ xxxx _DOT_ com'
     67  SMTP_PASSWORD_FILENAME = '/home/userid/xxxxx'
     68
     69  SENDER_EMAIL_ADDR='xxxxx _AT_ xxxxx _DOT_ net'
     70  MY_EMAIL_ADDR='xxxxx _AT_ xxxxx _DOT_ xxxxx _DOT_ com'
     71  SEND_MAIL_TO_PROJECT_MANAGER=0
    5172
    5273
Note: See TracChangeset for help on using the changeset viewer.