Ignore:
Timestamp:
Oct 17, 2007 10:57:13 AM (12 years ago)
Author:
jpfasano
Message:

Moved code that runs an svn command from nightlyBuild.py to its own file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/testScripts/nightlyBuild.py

    r626 r630  
    33import os
    44import sys
    5 import smtplib
    65import re
    76
     
    1110import NBemail
    1211import NBosCommand
     12import NBsvnCommand
    1313
    1414# TODO:
     
    8585
    8686#------------------------------------------------------------------------
    87 # Function for executing svn commands
    88 #------------------------------------------------------------------------
    89 def issueSvnCmd(svnCmd,dir,project) :
    90   retVal='OK'
    91   os.chdir(dir)
    92   NBlogMessages.writeMessage('  '+svnCmd)
    93   result = NBosCommand.run(svnCmd)
    94   if result['returnCode'] != 0 :
    95     NBemail.sendCmdMsgs(project,result,svnCmd)
    96     retVal='Error'
    97   return retVal
    98 
    99 #------------------------------------------------------------------------
    10087#  Main Program Starts Here 
    10188#------------------------------------------------------------------------
     
    119106  if not os.path.isdir(dataDir) :
    120107    svnCmd=os.path.join(NBuserConfig.SVNPATH_PREFIX,'svn') + ' checkout https://projects.coin-or.org/svn/Data/releases/1.0.0/'+d+' '+d
    121     if issueSvnCmd(svnCmd,dataBaseDir,'Data')!='OK' :
     108    if NBsvnCommand.run(svnCmd,dataBaseDir,'Data')!='OK' :
    122109      sys.exit(1)
    123110    result=NBosCommand.run('find '+d+' -name \*.gz -print | xargs gzip -d')
     
    140127  if not os.path.isdir(projectCheckOutDir) :
    141128    svnCmd=os.path.join(NBuserConfig.SVNPATH_PREFIX,'svn') + ' checkout https://projects.coin-or.org/svn/'+p+'/trunk trunk'
    142     if issueSvnCmd(svnCmd,projectBaseDir,p)!='OK' :
     129    if NBsvnCommand.run(svnCmd,projectBaseDir,p)!='OK' :
    143130      continue
    144131  else :
    145132    svnCmd=os.path.join(NBuserConfig.SVNPATH_PREFIX,'svn') + ' update'
    146     if issueSvnCmd(svnCmd,projectCheckOutDir,p)!='OK' :
     133    if NBsvnCommand.run(svnCmd,projectCheckOutDir,p)!='OK' :
    147134      continue
    148135
Note: See TracChangeset for help on using the changeset viewer.