- Timestamp:
- Nov 2, 2007 9:55:56 AM (13 years ago)
- Location:
- branches/testScripts
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/testScripts/NBbuildConfig.py
r718 r730 299 299 300 300 # Check if 'make test' worked 301 didMakeTestFail=configuration['checkMakeTest'](result,configuration['project'],"make test") 302 if didMakeTestFail : 303 result['configure flags']=configOptions 304 result['svn version']=configuration['svnVersion'] 305 result['make test']=didMakeTestFail 306 NBemail.sendCmdMsgs(configuration['project'],result,"make test") 307 return 301 for testFunc in configuration['checkMakeTest'] : 302 testResultFail=testFunc(result,configuration['project']) 303 if testResultFail : 304 result['configure flags']=configOptions 305 result['svn version']=configuration['svnVersion'] 306 result['make test']=testResultFail 307 NBemail.sendCmdMsgs(configuration['project'],result,"make test") 308 return 309 308 310 309 311 #--------------------------------------------------------------------- … … 334 336 stderrfile.close() 335 337 336 didUnitTestFail=configuration['unitTest']['checkUnitTest'](result,configuration['project'],unitTestCmdTemplate) 337 if didUnitTestFail : 338 result['configure flags']=configOptions 339 result['svn version']=configuration['svnVersion'] 340 result['unitTest']=didUnitTestFail 341 NBemail.sendCmdMsgs(p,result,unitTestCmd) 342 return 338 #didUnitTestFail=configuration['unitTest']['checkUnitTest'](result,configuration['project'],unitTestCmdTemplate) 339 #if didUnitTestFail : 340 # result['configure flags']=configOptions 341 # result['svn version']=configuration['svnVersion'] 342 # result['unitTest']=didUnitTestFail 343 # NBemail.sendCmdMsgs(p,result,unitTestCmd) 344 # return 345 346 for testFunc in configuration['unitTest']['checkUnitTest'] : 347 testResultFail=testFunc(result,configuration['project']) 348 if testResultFail : 349 result['configure flags']=configOptions 350 result['svn version']=configuration['svnVersion'] 351 result['unitTest']=testResultFail 352 NBemail.sendCmdMsgs(configuration['project'],result,unitTestCmd) 353 return 343 354 344 355 -
branches/testScripts/NBcheckResult.py
r722 r730 17 17 #------------------------------------------------------------------------ 18 18 19 # Assume result is always correct 20 def anythingGoes( result, project ) : 21 retVal = None 22 return retVal 23 24 # Is the rc=0? 19 25 def rc0( result, project ) : 20 26 retVal = None … … 22 28 if result['returnCode'] != 0 : 23 29 retVal = "Non-zero return code of "+str(result['returnCode']) 30 return retVal 31 32 # Is 0<=rc<=2? 33 def rc0to2( result, project ) : 34 retVal = None 35 # If the return code is not 0, then failure 36 if 0>result['returnCode'] or result['returnCode']>2 : 37 retVal = "Return code out of range. Expected: 0<=rc<=2. rc="+str(result['returnCode']) 38 return retVal 24 39 40 # Was the standard success message written? 25 41 def standardSuccessMessage(result,project) : 26 42 retVal = None … … 30 46 # Success message not found, assume test failed 31 47 retVal = "The output does not contain the messages: 'All tests completed successfully'" 48 return retVal 32 49 50 # Was woodw the last netlib problem run? 51 # Check that last netlib test case ran by looking for message of form 52 # '../../Data/Netlib/woodw took 0.47 seconds using algorithm either' 53 def endWithWoodw(result,project) : 54 retVal = None 55 reexp = r"(.|\n)*(\\|/)Data(\\|/)Netlib(\\|/)woodw took (\d*\.\d*) seconds using algorithm either(.|\n)*" 56 msgTail = result['stdout'][-200:] 57 if not re.compile(reexp).match(msgTail,1) : 58 # message not found, assume test failed 59 retVal = "Did not complete the woodw testcase" 60 return retVal 33 61 62 # Did Cbc 'make test' write its success message? 63 # Check that last the last few lines are of the form 64 # 'cbc_clp solved 2 out of 2 and took XX.XX seconds.' 65 def cbcMakeTestSuccessMessage(result,project) : 66 retVal=None 67 reexp=r"(.|\n)*cbc_clp solved 2 out of 2 and took (\d*\.\d*) seconds." 68 msgTail = result['stdout'][-300:] 69 if not re.compile(reexp).match(msgTail,1) : 70 # message not found, assume test failed 71 retVal = "Did not display message 'cbc_clp solved 2 out of 2 and took XX.XX seconds.'" 72 return retVal 34 73 35 def didTestFail( result, project, buildStep ) : 74 # Messages must not contain: 75 # "*** xxxSolverInterface testing issue: whatever the problem is" 76 def noSolverInterfaceTestingIssueMessage(result,project): 36 77 retVal = None 78 reexp=r'.*\*\*.+SolverInterface testing issue:.*' 79 if re.compile(reexp).match(result['stderr'],1) : 80 # message found, assume test failed 81 retVal = "Issued message: 'SolverInterface tessting issue:'" 82 if re.compile(reexp).match(result['stdout'],1) : 83 # message found, assume test failed 84 retVal = "Issued message: 'SolverInterface tessting issue:'" 85 return retVal 86 37 87 38 # If the return code is not 0, then failure 39 retVal=rc0(result,project) 40 if retVal : return retVal 88 # Look for pattern "<solver> solved NN out of 90 and took nnn.xx seconds" 89 def OsiUnitTestSuccessMessages(result,project): 90 retVal = None 91 # Look for pattern "<solver> solved NN out of 90 and took nnn.xx seconds" 92 r=r'((.+) solved (\d+) out of 90 and took (\d*\.\d*) seconds)' 93 osisSummaryResult=re.findall(r,result['stdout'][-800:]) 94 expectedOsis=['clp','sym','dylp','cbcclp'] 95 for osi in osisSummaryResult : 96 if osi[1] in expectedOsis: expectedOsis.remove(osi[1]) 97 numSolved = int(osi[2]) 98 # Sym only solves 89 of the 90 99 if osi[1]=='sym': 100 if numSolved<89 : 101 retVal=osi[1]+\ 102 " only solved "\ 103 +osi[2]\ 104 +" out of 90 in "\ 105 +osi[3]+" seconds" 106 elif numSolved<90 : 107 retVal=osi[1]+\ 108 " only solved "\ 109 +osi[2]+\ 110 " out of 90 in "\ 111 +osi[3]+" seconds" 112 if len(expectedOsis)!=0 : 113 retVal="Osi "+expectedOsis[0]+" did not report number solved" 114 return retVal 41 115 42 # Many tests write a "Success" message.43 # For test that do this, check for the success message44 if NBprojectConfig.ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS.has_key(project) :45 if buildStep in NBprojectConfig.ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS[project] :46 retVal= standardSuccessMessage(result,project)47 if retVal : return retVal48 49 #---------------------------------------------------------------------50 # Some (project,buildStep) pairs require further checking51 # to determine if they were successful52 #---------------------------------------------------------------------53 # Clp's "./clp -unitTest dirNetlib=_NETLIBDIR_ -netlib"54 if project=='Clp' and buildStep==NBprojectConfig.UNITTEST_CMD['Clp'] :55 # Check that last netlib test case ran by looking for message of form56 # '../../Data/Netlib/woodw took 0.47 seconds using algorithm either'57 reexp = r"(.|\n)*(\\|/)Data(\\|/)Netlib(\\|/)woodw took (\d*\.\d*) seconds using algorithm either(.|\n)*"58 msgTail = result['stdout'][-200:]59 if not re.compile(reexp).match(msgTail,1) :60 # message not found, assume test failed61 retVal = "Did not complete the woodw testcase"62 63 # Cbc's "make test"64 elif project=='Cbc' and buildStep=='make test' :65 # Check that last the last few lines are of the form66 # 'cbc_clp solved 2 out of 2 and took XX.XX seconds.'67 reexp=r"(.|\n)*cbc_clp solved 2 out of 2 and took (\d*\.\d*) seconds."68 msgTail = result['stdout'][-300:]69 if not re.compile(reexp).match(msgTail,1) :70 # message not found, assume test failed71 retVal = "Did not display message 'cbc_clp solved 2 out of 2 and took XX.XX seconds.'"72 73 # Cbc's "./cbc -unitTest dirNetlib=_MIPLIB3DIR_ -miplib"74 elif project=='Cbc' and buildStep==NBprojectConfig.UNITTEST_CMD['Cbc'] :75 if result['returnCode']>=0 and result['returnCode']<=2 :76 # return code is between 0 and 2.77 # Return code between 1 and 44 is the number of test cases that78 # ended because maxnodes limit reached. John Forrest says if this79 # is less than 3, the OK.80 retVal=None81 else :82 retVal = "Return code of "+str(result['returnCode'])+" which is > 2."83 84 # DyLP's "make test"85 # DyLP's "./unitTest -testOsiSolverInterface -netlibDir=_NETLIBDIR_"86 # Osi's "make test"87 # Osi's "./unitTest -testOsiSolverInterface -netlibDir=_NETLIBDIR_"88 elif project=='DyLP' and buildStep=='make test' or \89 project=='DyLP' and buildStep==NBprojectConfig.UNITTEST_CMD['Osi'] or \90 project=='Osi' and buildStep=='make test' or \91 project=='Osi' and buildStep==NBprojectConfig.UNITTEST_CMD['Osi'] :92 # Messages should not contain:93 # "*** xxxSolverInterface testing issue: whatever the problem is"94 reexp=r'.*\*\*.+SolverInterface testing issue:.*'95 if re.compile(reexp).match(result['stderr'],1) :96 # message found, assume test failed97 retVal = "Issued message: 'SolverInterface tessting issue:'"98 if re.compile(reexp).match(result['stdout'],1) :99 # message found, assume test failed100 retVal = "Issued message: 'SolverInterface tessting issue:'"101 102 if project=='Osi' and buildStep==NBprojectConfig.UNITTEST_CMD['Osi'] :103 104 # Look for pattern "<solver> solved NN out of 90 and took nnn.xx seconds"105 r=r'((.+) solved (\d+) out of 90 and took (\d*\.\d*) seconds)'106 osisSummaryResult=re.findall(r,result['stdout'][-800:])107 expectedOsis=['clp','sym','dylp','cbcclp']108 for osi in osisSummaryResult :109 if osi[1] in expectedOsis: expectedOsis.remove(osi[1])110 numSolved = int(osi[2])111 # Sym only solves 89 of the 90112 if osi[1]=='sym':113 if numSolved<89 :114 retVal=osi[1]+\115 " only solved "\116 +osi[2]\117 +" out of 90 in "\118 +osi[3]+" seconds"119 elif numSolved<90 :120 retVal=osi[1]+\121 " only solved "\122 +osi[2]+\123 " out of 90 in "\124 +osi[3]+" seconds"125 if len(expectedOsis)!=0 :126 retVal="Osi "+expectedOsis[0]+" did not report number solved"127 128 return retVal129 116 130 117 #------------------------------------------------------------------------- -
branches/testScripts/NBprojectConfig.py
r721 r730 26 26 #---------------------------------------------------------------------- 27 27 PROJECT_EMAIL_ADDRS['CoinUtils'] = 'ladanyi _AT_ us _DOT_ ibm _DOT_ com' 28 ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS['CoinUtils'] = ['make test'] 29 CHECK_MAKE_TEST['CoinUtils']=[NBcheckResult.rc0,NBcheckResult.standardSuccessMessage]28 CHECK_MAKE_TEST['CoinUtils']=[NBcheckResult.rc0, 29 NBcheckResult.standardSuccessMessage] 30 30 #does not have references to third party packages 31 31 … … 34 34 UNITTEST_DIR['DyLP'] = os.path.join('Osi','test') 35 35 UNITTEST_CMD['DyLP'] = './unitTest -testOsiSolverInterface -netlibDir=_NETLIBDIR_ -cerr2cout' 36 ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS['DyLP'] = ['make test'] 36 CHECK_MAKE_TEST['DyLP']=[ 37 NBcheckResult.rc0, 38 NBcheckResult.standardSuccessMessage, 39 NBcheckResult.noSolverInterfaceTestingIssueMessage] 40 CHECK_UNITTEST['DyLP']=[ 41 NBcheckResult.rc0, 42 NBcheckResult.standardSuccessMessage, 43 NBcheckResult.noSolverInterfaceTestingIssueMessage] 37 44 #does not have references to third party packages 38 45 … … 41 48 UNITTEST_DIR['Clp'] = os.path.join('Clp','src') 42 49 UNITTEST_CMD['Clp'] = './clp -unitTest dirNetlib=_NETLIBDIR_ -netlib' 43 ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS['Clp'] = ['make test',UNITTEST_CMD['Clp']] 50 CHECK_MAKE_TEST['Clp']=[ 51 NBcheckResult.rc0, 52 NBcheckResult.standardSuccessMessage] 53 CHECK_UNITTEST['Clp']=[ 54 NBcheckResult.rc0, 55 NBcheckResult.standardSuccessMessage, 56 NBcheckResult.endWithWoodw] 44 57 45 58 #---------------------------------------------------------------------- 46 59 PROJECT_EMAIL_ADDRS['SYMPHONY'] = 'tkr2 _AT_ lehigh _DOT_ edu' 47 ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS['SYMPHONY'] = ['make test'] 60 CHECK_MAKE_TEST['SYMPHONY']=[ 61 NBcheckResult.rc0, 62 NBcheckResult.standardSuccessMessage] 63 UNITTEST_DIR['SYMPHONY'] = '.' 64 UNITTEST_CMD['SYMPHONY'] = 'make fulltest' 65 CHECK_UNITTEST['SYMPHONY']=[ 66 NBcheckResult.rc0, 67 NBcheckResult.standardSuccessMessage, 68 ] 48 69 49 70 #---------------------------------------------------------------------- 50 71 PROJECT_EMAIL_ADDRS['Vol'] = 'barahon _AT_ us _DOT_ ibm _DOT_ com' 72 CHECK_MAKE_TEST['Vol']=[ 73 NBcheckResult.rc0] 51 74 #does not have references to third party packages 52 75 … … 55 78 UNITTEST_DIR['Osi'] = os.path.join('Osi','test') 56 79 UNITTEST_CMD['Osi'] = './unitTest -testOsiSolverInterface -netlibDir=_NETLIBDIR_ -cerr2cout' 57 ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS['Osi'] = ['make test',UNITTEST_CMD['Osi']] 80 CHECK_MAKE_TEST['Osi']=[ 81 NBcheckResult.rc0, 82 NBcheckResult.standardSuccessMessage, 83 NBcheckResult.noSolverInterfaceTestingIssueMessage] 84 CHECK_UNITTEST['Osi']=[ 85 NBcheckResult.rc0, 86 NBcheckResult.standardSuccessMessage, 87 NBcheckResult.noSolverInterfaceTestingIssueMessage] 58 88 59 89 #---------------------------------------------------------------------- 60 90 PROJECT_EMAIL_ADDRS['Cgl'] = 'robinlh _AT_ us _DOT_ ibm _DOT_ com' 61 ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS['Cgl'] = ['make test'] 91 CHECK_MAKE_TEST['Cgl']=[ 92 NBcheckResult.rc0, 93 NBcheckResult.standardSuccessMessage] 62 94 #does not have references to third party packages 63 95 … … 66 98 UNITTEST_DIR['Cbc'] = os.path.join('Cbc','src') 67 99 UNITTEST_CMD['Cbc'] = './cbc -unitTest -dirMiplib=_MIPLIB3DIR_ -miplib' 100 CHECK_MAKE_TEST['Cbc']=[ 101 NBcheckResult.rc0, 102 NBcheckResult.cbcMakeTestSuccessMessage] 103 CHECK_UNITTEST['Cbc']=[ NBcheckResult.rc0to2 ] 68 104 69 105 #---------------------------------------------------------------------- 70 106 PROJECT_EMAIL_ADDRS['Ipopt'] = 'andreasw _AT_ us _DOT_ ibm _DOT_ com' 107 CHECK_MAKE_TEST['Ipopt']=[NBcheckResult.rc0 108 # ,NBcheckResult.standardSuccessMessage 109 ] 71 110 #third party packages are not optional here 72 111 73 112 #---------------------------------------------------------------------- 74 113 PROJECT_EMAIL_ADDRS['Bonmin'] = 'pbonami _AT_ us _DOT_ ibm _DOT_ com' 114 CHECK_MAKE_TEST['Bonmin']=[NBcheckResult.rc0 115 ,NBcheckResult.standardSuccessMessage 116 ] 75 117 #third party packages are not optional here 76 118 77 119 #---------------------------------------------------------------------- 78 120 PROJECT_EMAIL_ADDRS['FlopC++'] = 'Tim _DOT_ Hultberg _AT_ eumetsat _DOT_ int' 79 ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS['FlopC++'] = ['make test'] 121 CHECK_MAKE_TEST['FlopC++']=[ 122 NBcheckResult.rc0, 123 NBcheckResult.standardSuccessMessage] 80 124 #does not have references to third party packages 81 125 82 126 #---------------------------------------------------------------------- 83 127 PROJECT_EMAIL_ADDRS['OS'] = 'kipp _DOT_ martin _AT_ chicagogsb _DOT_ edu' 84 ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS['OS'] = ['make test'] 128 CHECK_MAKE_TEST['OS']=[ 129 NBcheckResult.rc0, 130 NBcheckResult.standardSuccessMessage] 85 131 #third party packages are not optional if Ipopt is not excluded 86 132 87 133 #---------------------------------------------------------------------- 88 134 PROJECT_EMAIL_ADDRS['CppAD'] = 'bradbell _AT_ washington _DOT_ edu' 135 CHECK_MAKE_TEST['CppAD']=[NBcheckResult.anythingGoes] 136 UNITTEST_DIR['CppAD'] = os.path.join('.') 137 UNITTEST_CMD['CppAD'] = './example/example' 138 CHECK_UNITTEST['CppAD']=[NBcheckResult.rc0] 89 139 #does not have references to third party packages 90 140 91 141 #---------------------------------------------------------------------- 92 142 PROJECT_EMAIL_ADDRS['Smi'] = 'kingaj _AT_ us _DOT_ ibm _DOT_ com' 143 CHECK_MAKE_TEST['Smi']=[ 144 NBcheckResult.rc0, 145 NBcheckResult.standardSuccessMessage] 93 146 #does not have references to third party packages 94 147 #TODO: need some check whether make test was successful; what is the behaviour in Smi's unittest if it fails? -
branches/testScripts/NBuserParametersDefault.py
r719 r730 61 61 #,{ 'SvnVersion': 'trunk', 'OptLevel': 'Debug', 'ThirdParty': 'No' } 62 62 #,{ 'SvnVersion': 'latestStable', 'OptLevel': 'Default', 'ThirdParty': 'No' } 63 ,{ 'SvnVersion': 'latestStable', 'OptLevel': 'Debug', 'ThirdParty': 'No' } 63 #,{ 'SvnVersion': 'latestStable', 'OptLevel': 'Debug', 'ThirdParty': 'No' } 64 #,{ 'SvnVersion': 'latestRelease', 'OptLevel': 'Default', 'ThirdParty': 'No' } 64 65 ], 65 66 'Osi' : … … 89 90 'Cbc' : 90 91 [ 91 { 'Reference' : 'CoinUtils' }, 92 { 'Reference' : 'CoinUtils' } 93 92 94 # And build a parallel version with Third Party 93 94 95 96 97 98 95 #,{ 96 # 'SvnVersion': 'latestStable', 97 # 'OptLevel': 'Default', 98 # 'ThirdParty': 'Yes', 99 # 'AdditionalConfigOptions': '--enable-cbc-parallel' 100 # } 99 101 ], 100 102 'Smi' : … … 108 110 'Ipopt' : 109 111 [ 110 { 'SvnVersion': 'trunk', 'OptLevel': 'Default', 'ThirdParty':'Yes' } 112 { 'SvnVersion': 'trunk', 'OptLevel': 'Default', 'ThirdParty':'Yes' } 113 #,{ 'SvnVersion': 'trunk', 'OptLevel': 'Debug', 'ThirdParty':'Yes' } 114 #,{ 'SvnVersion': 'latestStable', 'OptLevel': 'Default', 'ThirdParty':'Yes' } 115 #,{ 'SvnVersion': 'latestRelease','OptLevel': 'Default', 'ThirdParty':'Yes' } 111 116 ], 112 117 'Bonmin' : … … 116 121 'OS' : 117 122 [ 118 { 'Reference' : 'Ipopt' }, 119 { 120 'SvnVersion': 'trunk', 121 'OptLevel': 'Default', 122 'ThirdParty': 'No', 123 'SkipProjects': ('Ipopt') } 123 { 'Reference' : 'Ipopt' } 124 #,{ 'SvnVersion': 'trunk', 'OptLevel': 'Default', 'ThirdParty': 'No', 'SkipProjects': ('Ipopt') } 125 #,{ 'SvnVersion': 'trunk', 'OptLevel': 'Debug', 'ThirdParty': 'No', 'SkipProjects': ('Ipopt') } 126 #,{ 'SvnVersion': 'latestStable', 'OptLevel': 'Default', 'ThirdParty': 'No', 'SkipProjects': ('Ipopt') } 127 #,{ 'SvnVersion': 'latestRelease','OptLevel': 'Default', 'ThirdParty': 'No', 'SkipProjects': ('Ipopt') } 124 128 ], 125 129 'CppAD' : 126 130 [ 127 { 'SvnVersion': 'latestStable', 'OptLevel': 'Default', 'ThirdParty': 'No' } 131 { 'SvnVersion': 'trunk', 'OptLevel': 'Default', 'ThirdParty': 'No', 'AdditionalConfigOptions':'--with-Example' } 132 #,{ 'SvnVersion': 'trunk', 'OptLevel': 'Debug', 'ThirdParty': 'No', 'AdditionalConfigOptions':'--with-Example' } 133 #,{ 'SvnVersion': 'latestStable', 'OptLevel': 'Default', 'ThirdParty': 'No', 'AdditionalConfigOptions':'--with-Example' } 134 #,{ 'SvnVersion': 'latestRelease','OptLevel': 'Default', 'ThirdParty': 'No', 'AdditionalConfigOptions':'--with-Example' } 128 135 ], 129 136 'Smi' : -
branches/testScripts/nightlyBuild.py
r723 r730 153 153 # Setup checkMakeTest 154 154 #--------------------------------------------------------------------- 155 configuration['checkMakeTest']=NBcheckResult.didTestFail 155 #configuration['checkMakeTest']=NBcheckResult.didTestFail 156 configuration['checkMakeTest']=NBprojectConfig.CHECK_MAKE_TEST[p] 156 157 157 158 … … 167 168 168 169 configuration['unitTest']['command']=unitTestCmd 169 configuration['unitTest']['checkUnitTest']=NB checkResult.didTestFail170 configuration['unitTest']['checkUnitTest']=NBprojectConfig.CHECK_UNITTEST[p] 170 171 configuration['unitTest']['path']=NBprojectConfig.UNITTEST_DIR[p] 171 172
Note: See TracChangeset
for help on using the changeset viewer.