Changeset 642
- Timestamp:
- Oct 21, 2007 2:36:50 AM (13 years ago)
- Location:
- branches/testScripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/testScripts/NBcheckResult.py
r639 r642 13 13 #------------------------------------------------------------------------ 14 14 def didTestFail( result, project, buildStep ) : 15 retVal = 015 retVal = None 16 16 17 17 # If the return code is not 0, then failure 18 18 if result['returnCode'] != 0 : 19 retVal = 119 retVal = "Non-zero return code of "+result['returnCode'] 20 20 21 21 # Many tests write a "Success" message. … … 27 27 result['stdout'].rfind("All tests completed successfully") == -1 : 28 28 # Success message not found, assume test failed 29 retVal = 129 retVal = "The output does not contain the messages: 'All tests completed successfully'" 30 30 31 31 #--------------------------------------------------------------------- … … 41 41 if not re.compile(reexp).match(msgTail,1) : 42 42 # message not found, assume test failed 43 retVal = 143 retVal = "Did not complete the woodw testcase" 44 44 45 45 # Cbc's "make test" … … 51 51 if not re.compile(reexp).match(msgTail,1) : 52 52 # message not found, assume test failed 53 retVal = 153 retVal = "Did not dispaly message 'cbc_clp solved 2 out of 2 and took XX.XX seconds.'" 54 54 55 55 # Cbc's "./cbc -unitTest dirNetlib=_MIPLIB3DIR_ -miplib" … … 60 60 # ended because maxnodes limit reached. John Forrest says if this 61 61 # is less than 3, the OK. 62 retVal= 062 retVal=None 63 63 else : 64 retVal =164 retVal = "Return code of "+result['returnCode']+" which is > 2." 65 65 66 66 # DyLP's "make test" … … 77 77 if re.compile(reexp).match(result['stderr'],1) : 78 78 # message found, assume test failed 79 retVal = 179 retVal = "Issued message: 'SolverInterface tessting issue:'" 80 80 if re.compile(reexp).match(result['stdout'],1) : 81 81 # message found, assume test failed 82 retVal = 182 retVal = "Issued message: 'SolverInterface tessting issue:'" 83 83 84 84 if project=='DyLP' and buildStep==NBprojectConfig.UNITTEST_CMD['Osi'] or \ … … 88 88 r=r'((.+) solved (\d+) out of 90 and took (\d*\.\d*) seconds)' 89 89 osisSummaryResult=re.findall(r,result['stdout'][-800:]) 90 expectedOsis=['clp','sym','dylp','cbcclp'] 90 91 for osi in osisSummaryResult : 91 if int(osi[2])<90 : 92 #print osi[1]+" ran "+osi[2]+" out of 90 in "+osi[3]+" seconds" 93 retVal=1 92 if osi[1] in expectedOsis: expectedOsis.remove(osi[1]) 93 numSolved = int(osi[2]) 94 # Sym only solves 89 of the 90 95 if osi[1]=='sym': 96 if numSolved<89 : 97 retVal=osi[1]+\ 98 " only solved "\ 99 +osi[2]\ 100 +" out of 90 in "\ 101 +osi[3]+" seconds" 102 elif numSolved<90 : 103 retVal=osi[1]+\ 104 " only solved "\ 105 +osi[2]+\ 106 " out of 90 in "\ 107 +osi[3]+" seconds" 108 if len(expectedOsis)!=0 : 109 retVal="Osi "+expectedOsis[0]+" did not report number solved" 94 110 95 111 return retVal -
branches/testScripts/NBemail.py
r635 r642 51 51 emailMsg += "PATH: "+os.environ["PATH"]+"\n" 52 52 53 if cmdMsgs.has_key('make test') : 54 emailMsg += "\n\n'make test' problem:\n" 55 emailMsg += cmdMsgs['make test'] 56 emailMsg += "\n" 57 if cmdMsgs.has_key('unitTest') : 58 emailMsg += "\n\nDetected problem:\n" 59 emailMsg += cmdMsgs['unitTest'] 60 emailMsg += "\n" 61 53 62 emailMsg +="\n" 54 63 … … 60 69 emailMsg += "\n\nconfig.log messages are:\n" 61 70 emailMsg += cmdMsgs['config.log'] 71 62 72 send(toAddrs,subject,emailMsg) 63 73 NBlogMessages.writeMessage( " email sent regarding "+project+" running '"+cmd+"'" ) -
branches/testScripts/nightlyBuild.py
r640 r642 136 136 137 137 # Check if 'make test' worked 138 if NBcheckResult.didTestFail(result,p,"make test") : 138 didMakeTestFail=NBcheckResult.didTestFail(result,p,"make test") 139 if didMakeTestFail : 140 result['make test']=didMakeTestFail 139 141 NBemail.sendCmdMsgs(p,result,"make test") 140 142 continue … … 154 156 result=NBosCommand.run(unitTestCmd) 155 157 156 if NBcheckResult.didTestFail(result,p,unitTestCmdTemplate) : 158 didUnitTestFail=NBcheckResult.didTestFail(result,p,unitTestCmdTemplate) 159 if didUnitTestFail : 160 result['unitTest']=didUnitTestFail 157 161 NBemail.sendCmdMsgs(p,result,unitTestCmd) 158 162 continue
Note: See TracChangeset
for help on using the changeset viewer.