Changeset 677 for branches


Ignore:
Timestamp:
Oct 25, 2007 6:46:10 AM (12 years ago)
Author:
stefan
Message:

store output from get.XXX, make, make test, configure, unittest in NB... files

Location:
branches/testScripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/testScripts/NBbuildConfig.py

    r676 r677  
    4646#   that are the same for every build configuration so they don't need
    4747#   to be part of the vpath directory name.
    48 #   Example: 'CXX=g++ -m64 LDFLAGS=-lstdc++'
     48#   Example: 'CXX="g++ -m64" LDFLAGS=-lstdc++'
    4949#
    5050#  configuration['SkipProjects']= List of COIN projects to skip (exclude)
     
    5656#
    5757#  configuration['unitTest']= undefined or dictionary D where
    58 #    D['path']= relataive path were unitTest is to be run from.
     58#    D['path']= relative path were unitTest is to be run from.
    5959#    D['command']= command to be issued to run unitTest
    60 #    d['checkUnitTest']= function to be called to determine if unitTest
     60#    D['checkUnitTest']= function to be called to determine if unitTest
    6161#       ran correctly.
    6262#------------------------------------------------------------------------
     
    114114              if os.path.isfile(install3rdPartyCmd) :
    115115                NBlogMessages.writeMessage('  '+install3rdPartyCmd)
    116                 NBosCommand.run(install3rdPartyCmd)
    117                 f=open('NBinstalldone','w')
    118                 f.close()
     116                installReturn = NBosCommand.run(install3rdPartyCmd)
     117                if installReturn['returnCode'] :
     118                  NBlogMessages.writeMsg('  warning: Install of 3rd party code in '+thirdPartyDir+' returned '+installReturn['returnCode'])
     119                else :
     120                  f=open('NBinstalldone','w')
     121                  f.close()
     122                stdoutfile=open(thirdPartyDir+'/NBstdout','w')
     123                stdoutfile.write(installReturn['stdout'])
     124                stdoutfile.close()
     125                stderrfile=open(thirdPartyDir+'/NBstderr','w')
     126                stderrfile.write(installReturn['stderr'])
     127                stderrfile.close()
    119128            else :
    120129              NBlogMessages.writeMessage('  skipped a new download of '+d)
    121130        else :
    122131          NBlogMessages.writeMessage('  Skipped a new download into '+thirdPartyBaseDir)
    123    
     132
    124133  #---------------------------------------------------------------------
    125134  # Source is now available, so now it is time to run config
     
    157166  vpathDir=vpathDir.replace('--enable','')
    158167  if vpathDir==svnVersionFlattened : vpathDir+='-default'
    159  
     168
    160169  fullVpathDir = os.path.join(projectBaseDir,vpathDir)
    161170  if not os.path.isdir(fullVpathDir) :
     
    175184  # If config was previously run, then no need to run again.
    176185  if NBcheckResult.didConfigRunOK() :
    177     NBlogMessages.writeMessage("  '"+configCmd+"' previously ran. Not rerunning")
     186    NBlogMessages.writeMessage("  configure previously ran. Not rerunning.")
    178187  else :
    179188    NBlogMessages.writeMessage("  "+configCmd)
     
    181190    # Finally run config
    182191    result=NBosCommand.run(configCmd)
    183      
     192    stdoutfile=open('NBconfig.stdout','w')
     193    stdoutfile.write(result['stdout'])
     194    stdoutfile.close()
     195    stderrfile=open('NBconfig.stderr','w')
     196    stderrfile.write(result['stderr'])
     197    stderrfile.close()
     198
    184199    # Check if configure worked
    185200    if result['returnCode'] != 0 :
     
    200215  NBlogMessages.writeMessage( '  make' )
    201216  result=NBosCommand.run('make')
    202      
     217  stdoutfile=open('NBmake.stdout','w')
     218  stdoutfile.write(result['stdout'])
     219  stdoutfile.close()
     220  stderrfile=open('NBmake.stderr','w')
     221  stderrfile.write(result['stderr'])
     222  stderrfile.close()
     223
    203224  # Check if make worked
    204225  if result['returnCode'] != 0 :
     
    211232  NBlogMessages.writeMessage( '  make test' )
    212233  result=NBosCommand.run('make test')
    213      
     234  stdoutfile=open('NBmaketest.stdout','w')
     235  stdoutfile.write(result['stdout'])
     236  stdoutfile.close()
     237  stderrfile=open('NBmaketest.stderr','w')
     238  stderrfile.write(result['stderr'])
     239  stderrfile.close()
     240
    214241  # Check if 'make test' worked
    215242  didMakeTestFail=configuration['checkMakeTest'](result,configuration['project'],"make test")
     
    239266    NBlogMessages.writeMessage( '  '+unitTestCmd )
    240267    result=NBosCommand.run(unitTestCmd)
    241      
     268    stdoutfile=open('NBunittest.stdout','w')
     269    stdoutfile.write(result['stdout'])
     270    stdoutfile.close()
     271    stderrfile=open('NBunittest.stderr','w')
     272    stderrfile.write(result['stderr'])
     273    stderrfile.close()
     274
    242275    didUnitTestFail=configuration['unitTest']['checkUnitTest'](result,configuration['project'],unitTestCmdTemplate)
    243276    if didUnitTestFail :
  • branches/testScripts/newNightlyBuild.py

    r676 r677  
    2020#   -Skip make of project that depend on a project which make had been failing. (Similar for configure.)
    2121#    But also tell project managers of skiped project that their project was skipped.
    22 #   -Store output of get.XXX calls, make, make test, configures... in some files.
    23 #   -Allow a fine configuration of which build tests to run per project.
    24 #   -Move actual [get project, configure, make, tests] part into an extra file.
    2522
    2623
Note: See TracChangeset for help on using the changeset viewer.