Changeset 649 for branches/testScripts


Ignore:
Timestamp:
Oct 21, 2007 1:22:17 PM (12 years ago)
Author:
jpfasano
Message:

Many changes thanks to Kipp getting over the vpath hurdle.
Added ability to build trunk and/or latestStable.
Added ability to run config with default or debug.
Working on ability to run config to skip 3rd party code

Location:
branches/testScripts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/testScripts/NBcheckResult.py

    r647 r649  
    1717  # If the return code is not 0, then failure
    1818  if result['returnCode'] != 0 :
    19     retVal = "Non-zero return code of "+result['returnCode']
     19    retVal = "Non-zero return code of "+str(result['returnCode'])
    2020
    2121  # Many tests write a "Success" message.
     
    6262      retVal=None
    6363    else :
    64       retVal = "Return code of "+result['returnCode']+" which is > 2."
     64      retVal = "Return code of "+str(result['returnCode'])+" which is > 2."
    6565
    6666  # DyLP's "make test"
  • branches/testScripts/NBuserConfig.py

    r647 r649  
    138138PROJECTS = ['CoinUtils','DyLP','Clp','SYMPHONY','Vol','Osi','Cgl','Cbc',\
    139139            'FlopC++','Ipopt','OS','CppAD']
    140 PROJECTS =['CoinUtils']
     140
     141
     142#----------------------------------------------------------------------
     143# For every project, indicate which svn versions are to be used.
     144# Supported versions are: trunk & latestStable
     145#----------------------------------------------------------------------
     146PROJECT_VERSIONS = ['trunk','latestStable']
     147
     148#----------------------------------------------------------------------
     149# For every project version, indicate all the ways the code is to
     150# be built.
     151# Presently, NoThirdParty is not yet working
     152#----------------------------------------------------------------------
     153BUILD_TYPES = [\
     154              ['Default','ThirdParty'   ],\
     155              ['Debug',  'ThirdParthy'  ]\
     156              #['Debug',  'NoThirdParthy']\
     157              ]
     158
     159               
    141160
    142161#----------------------------------------------------------------------
  • branches/testScripts/nightlyBuild.py

    r647 r649  
    1515# TODO:
    1616#   -Get some information about the platform and put this in email failure message.
    17 #   -Implement Kipp's vpath (delete vpath instead of 'make distclean').
     17#   -In userConfig allow one to optionally do a clean checkout and/or config
    1818#   -Don't do build if 'svn update' doesn't change anything and prior test was OK.
    1919#     (no need to re-run if nothing has changed since prior run)
    20 #   -Build both trunk and latest stable
    21 #   -Build both optimized and debug (or have a set of config-site scripts to test?)
     20#   -Figure out how to run configure with no third party code
    2221
    2322
     
    6059  #---------------------------------------------------------------------
    6160  # Loop once for each version of the project to be checked out.
    62   # Presently this is only trunk, but it should optionally be
    63   # latest stable and trunk
     61  # The supported types are trunk & latestStable
    6462  #---------------------------------------------------------------------
    65   projectVersions=['trunk']
     63  projectVersions=[]
     64  if 'latestStable' in NBuserConfig.PROJECT_VERSIONS :
     65    lsv = NBsvnCommand.latestStableVersion(p)
     66    projectVersions.append(['stable'+lsv,'stable/'+lsv])
     67  if 'trunk' in NBuserConfig.PROJECT_VERSIONS :
     68    projectVersions.append(['trunk','trunk'])
    6669  for projectVersion in projectVersions :
    6770    #---------------------------------------------------------------------
     
    6972    #---------------------------------------------------------------------
    7073    projectBaseDir=os.path.join(NBuserConfig.NIGHTLY_BUILD_ROOT_DIR,p)
    71     projectCheckOutDir=os.path.join(projectBaseDir,projectVersion)
     74    projectCheckOutDir=os.path.join(projectBaseDir,projectVersion[0])
    7275    if not os.path.isdir(projectBaseDir) :
    7376      os.makedirs(projectBaseDir)
    7477    if not os.path.isdir(projectCheckOutDir) :
    7578      svnCmd=os.path.join(NBuserConfig.SVNPATH_PREFIX,'svn') +\
    76              ' checkout https://projects.coin-or.org/svn/'+p+'/'+projectVersion+' '+projectVersion
     79             ' checkout https://projects.coin-or.org/svn/'+p+'/'+projectVersion[1]+' '+projectVersion[0]
    7780      if NBsvnCommand.run(svnCmd,projectBaseDir,p)!='OK' :
    7881        continue
     
    102105    # vpath and options to configure must be set for the buildType
    103106    #---------------------------------------------------------------------
    104     buildTypes=['Default','Debug']
    105     for buildType in buildTypes :   
     107    for buildType in NBuserConfig.BUILD_TYPES :   
    106108   
    107109      #---------------------------------------------------------------------
    108       # Setup the directory where the build will be done
    109       #---------------------------------------------------------------------
    110       vpathDir = projectVersion+buildType
     110      # Setup the directory where the build will be done and the configure
     111      # command options
     112      #---------------------------------------------------------------------
     113      vpathDir=projectVersion[0]
     114      configOptions='-C'
     115
     116      if "Debug" in buildType :
     117        vpathDir += "Debug"
     118        configOptions += " --enable-debug"
     119      else :
     120        vpathDir += "Default"
     121
     122      if "ThirdParty" in buildType :
     123        vpathDir += "ThirdParty"
     124      else :
     125        vpathDir += "NoThirdParty"
     126        thirdPartyBaseDir=os.path.join(projectCheckOutDir,'ThirdParty')
     127        if os.path.isdir(thirdPartyBaseDir) :
     128          thirdPartyDirs = os.listdir(thirdPartyBaseDir)
     129          skipOptions=''
     130          for d in thirdPartyDirs :
     131            skipOptions+=' ThirdParty/'+d
     132          configOptions+=' COIN_SKIP_PROJECTS="'+skipOptions+'"'
     133     
    111134      fullVpathDir = os.path.join(projectBaseDir,vpathDir)
    112135      #TODO: if (MAKE_CLEAN) : distutils.dir_util.remove_tree(fullVpathDir)
    113136      if not os.path.isdir(fullVpathDir) : os.mkdir(fullVpathDir)
    114       print fullVpathDir
    115137
    116138      #---------------------------------------------------------------------
     
    119141      #---------------------------------------------------------------------
    120142      os.chdir(fullVpathDir)
    121       #configCmd = os.path.join('.','configure -C')
    122       configCmd = os.path.join('.',projectCheckOutDir,"configure -C")
    123       if buildType=='Debug' : configCmd += " --enable-debug"
    124       print configCmd
     143      configCmd = os.path.join('.',projectCheckOutDir,"configure "+configOptions)
    125144      if NBcheckResult.didConfigRunOK() :
    126145        NBlogMessages.writeMessage("  '"+configCmd+"' previously ran. Not rerunning")
     
    172191        unitTestPath = os.path.join(fullVpathDir,NBprojectConfig.UNITTEST_DIR[p])
    173192        os.chdir(unitTestPath)
    174         print unitTestPath
    175193
    176194        unitTestCmdTemplate=NBprojectConfig.UNITTEST_CMD[p]
Note: See TracChangeset for help on using the changeset viewer.