Changeset 624


Ignore:
Timestamp:
Oct 16, 2007 6:04:03 PM (12 years ago)
Author:
jpfasano
Message:

fixed problem in how cbc and clp's output checked for successful run

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/testScripts/nightlyBuild.py

    r620 r624  
    2727
    2828#------------------------------------------------------------------------
     29# Run command in another process.
     30# Return: command's return code, stdout messages, & stderr messages
     31#------------------------------------------------------------------------
     32def runCommand(cmd) :
     33  p=subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
     34  p.wait
     35  cmdRc=p.returncode
     36  cmdStdout=p.stdout.read()
     37  cmdStderr=p.stderr.read()
     38
     39#------------------------------------------------------------------------
    2940# Function to Check Return Code from unitTest
    3041#------------------------------------------------------------------------
     
    4960  # to determine if they were successful
    5061  #---------------------------------------------------------------------
    51   # Clp's "./clp -unitTest -netlib dirNetlib=_NETLIBDIR_"
     62  # Clp's "./clp -unitTest dirNetlib=_NETLIBDIR_ -netlib"
    5263  if project=='Clp' and buildStep==NBprojectConfig.UNITTEST_CMD['Clp'] :
    5364    # Check that last netlib test case ran by looking for message of form
     
    6980      retVal = 1
    7081
    71   # Cbc's "./cbc -unitTest -miplib dirNetlib=_MIPLIB3DIR_"
     82  # Cbc's "./cbc -unitTest dirNetlib=_MIPLIB3DIR_ -miplib"
    7283  elif project=='Cbc' and buildStep==NBprojectConfig.UNITTEST_CMD['Cbc'] :
    7384    if rc[0]>=0 and rc[0]<=2 :
     
    203214    os.chdir(unitTestPath)
    204215
    205     unitTestCmd=NBprojectConfig.UNITTEST_CMD[p]
    206     unitTestCmd=unitTestCmd.replace('_NETLIBDIR_',netlibDir)
     216    unitTestCmdTemplate=NBprojectConfig.UNITTEST_CMD[p]
     217    unitTestCmd=unitTestCmdTemplate.replace('_NETLIBDIR_',netlibDir)
    207218    unitTestCmd=unitTestCmd.replace('_MIPLIB3DIR_',miplib3Dir)
    208219
     
    210221    rc=commands.getstatusoutput(unitTestCmd)
    211222 
    212     if didTestFail(rc,p,unitTestCmd) :
     223    if didTestFail(rc,p,unitTestCmdTemplate) :
    213224      NBemail.sendCmdMsgs(p,rc[1],unitTestCmd)
    214225      continue
Note: See TracChangeset for help on using the changeset viewer.