Changeset 687 for branches


Ignore:
Timestamp:
Oct 25, 2007 1:55:46 PM (12 years ago)
Author:
jpfasano
Message:

Modified to skip build if prior build finished OK, and nothing has changed (ie
no modifed source code)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/testScripts/NBbuildConfig.py

    r686 r687  
    7575  projectBaseDir=os.path.join(configuration['rootDir'],configuration['project'])
    7676  projectCheckOutDir=os.path.join(projectBaseDir,svnVersionFlattened)
     77
     78  svnCheckOutUrl='https://projects.coin-or.org/svn/'+\
     79                 configuration['project']+'/'+\
     80                 configuration['svnVersion']
    7781
    7882  vpathDir=''
     
    9498  fullVpathDir = os.path.join(projectBaseDir,vpathDir)
    9599
     100  NBlogMessages.writeMessage('  SVN source URL: '+svnCheckOutUrl)
     101  NBlogMessages.writeMessage('  Checkout directory: '+projectCheckOutDir)
     102  NBlogMessages.writeMessage('  Vpath directory: '+fullVpathDir)
     103 
     104
    96105  #---------------------------------------------------------------------
    97106  # Create the vpath directory if it doesn't exist
     
    100109  if not os.path.isdir(fullVpathDir) :
    101110    os.makedirs(fullVpathDir)
     111
     112  #---------------------------------------------------------------------
     113  # If nothing has changed and the prior run tested OK, then there
     114  # is no need to do anything.
     115  #---------------------------------------------------------------------
    102116  os.chdir(fullVpathDir)
    103   if os.path.isfile('NBallTestsPassed') : os.remove('NBallTestsPassed')
     117
     118  if os.path.isfile('NBallTestsPassed') :
     119    if not NBsvnCommand.newer(svnCheckOutUrl,projectCheckOutDir):
     120      # Previous run ran fine, and nothing has changed.
     121      NBlogMessages.writeMessage('  No changes since previous successfull run')
     122      return
     123    os.remove('NBallTestsPassed')
    104124
    105125  #---------------------------------------------------------------------
     
    113133      svnCmd='svn ' +\
    114134           'checkout ' +\
    115            'https://projects.coin-or.org/svn/'+configuration['project']+'/'+configuration['svnVersion']+\
     135           svnCheckOutUrl +\
    116136           ' '+svnVersionFlattened
    117137      if NBsvnCommand.run(svnCmd,projectBaseDir,configuration['project'])!='OK' :
     
    301321  # Everything build and all tests passed.
    302322  #---------------------------------------------------------------------
    303   #os.chdir(fullVpathDir)
    304   #f=open('NBallTestsPassed','w')
    305   #f.close()
     323  os.chdir(fullVpathDir)
     324  f=open('NBallTestsPassed','w')
     325  f.close()
Note: See TracChangeset for help on using the changeset viewer.