- Timestamp:
- Nov 9, 2007 7:43:14 PM (12 years ago)
- Location:
- branches/testScripts
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/testScripts/AUTHORS
- Property svn:eol-style set to native
-
branches/testScripts/INSTALL
- Property svn:eol-style set to native
r714 r739 15 15 Please read the comments in NBuserParametersDefault.ny about detailed information which settings can be made and how they are specified. 16 16 To get things running properly, you will need to specify at least information about the sending of emails. 17 18 To build on Windows using the Microsoft compiler and the COIN-OR project supplied solution 19 files (.sln) the following hints may be useful: 20 - Subversion needs to be installed and runnable from a dos window command line. 21 The following subversion install file has worked for this: 22 http://subversion.tigris.org/files/documents/15/39559/svn-1.4.5-setup.exe 23 - Python needs to be installed and runnable from a dos window command line. 24 - The environment variables for accessing the microsoft compiler must be setup. 25 Microsoft provides a script to do this: 26 Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat 27 - The LIB environment variable needs to be set to the location of some MS provided 28 libraries. The following commands have been used to achieve this: 29 set LIB=E:\Microsoft Platform SDK for Windows Server 2003 R2\Lib 30 set LIB=E:\Microsoft Visual Studio 8\VC\lib;%LIB% 31 32 - A summary of the commands that have worked to start nightlyBuild for a DOS window 33 are: 34 "E:\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat" 35 set LIB=E:\Microsoft Platform SDK for Windows Server 2003 R2\Lib 36 set LIB=E:\Microsoft Visual Studio 8\VC\lib;%LIB% 37 f: 38 cd \testScripts\ 39 nightlyBuild.py 40 -
branches/testScripts/LICENSE
- Property svn:eol-style set to native
-
branches/testScripts/NBbuildConfig.py
r737 r739 36 36 # Examples are: "trunk", "stable/3.2", "releases/3.3.3" 37 37 # 38 # configuration['buildMethod']= Defines method for building code. 39 # Choices are: 40 # msSoln: use microsoft compiler with a solution (sln) file. 41 # unixConfig: use sequence "./configure", "make", "make test" 42 # 38 43 # configuration['noThirdParty']=True or False (optional). If False 39 44 # then 3rd party code will be used. If not specified then 3rd part 40 45 # code will be skipped. 46 # Only used if configuration['buildMethod']=='unixConfig' 41 47 # 42 48 # configuration['configOptions']: Parameters to be passed to configure. 43 49 # The -C option and the options for skipping 3rd party code do not 44 50 # need to be specified. These will be generated by this function. 45 # There are two types of configOptions to be specified. 51 # There are two types of configOptions to be specified. 52 # Only used if configuration['buildMethod']=='unixConfig' 46 53 # configuration['configOptions']['unique']= These are options that 47 54 # distinguish different build configurations. These options are used … … 52 59 # to be part of the vpath directory name. 53 60 # Example: 'CXX="g++ -m64" LDFLAGS=-lstdc++' 54 # 61 # 55 62 # configuration['SkipProjects']= List of COIN projects to skip (exclude) 56 63 # from the build. 57 64 # examples: "Ipopt", "Ipopt DyLP" 65 # Only used if configuration['buildMethod']=='unixConfig' 58 66 # 59 67 # configuration['checkMakeTest']= function to be called to determine 60 68 # if "make test" ran correctly 69 # Only used if configuration['buildMethod']=='unixConfig' 61 70 # 62 71 # configuration['unitTest']= undefined or dictionary D where … … 65 74 # D['checkUnitTest']= function to be called to determine if unitTest 66 75 # ran correctly. 76 # Only used if configuration['buildMethod']=='unixConfig' 77 # 78 # configuration['test'] 79 # configuration['slnFile'] 67 80 #------------------------------------------------------------------------ 68 81 def run(configuration) : … … 74 87 #--------------------------------------------------------------------- 75 88 # Create names of directory where source is located and 76 # and were object, libs and executables are located ( vpath).77 # To compute vpathdirectory, the ./configure options need to be89 # and were object, libs and executables are located (build directory) 90 # To compute build directory, the ./configure options need to be 78 91 # generated. 79 92 #--------------------------------------------------------------------- … … 85 98 configuration['svnVersion'] 86 99 87 vpathDir='' 88 89 if 'SkipProjects' in configuration : 90 vpathDir+="No"+configuration['SkipProjects'] 91 if 'noThirdParty' in configuration : 92 if configuration['noThirdParty'] : 93 vpathDir+='-NoThirdParty' 94 vpathDir=svnVersionFlattened+\ 95 configuration['configOptions']['unique']+\ 96 vpathDir 97 vpathDir=vpathDir.replace(' ','') 98 vpathDir=vpathDir.replace('"','') 99 vpathDir=vpathDir.replace("'",'') 100 vpathDir=vpathDir.replace('--enable','') 101 if vpathDir==svnVersionFlattened : vpathDir+='-default' 102 103 fullVpathDir = os.path.join(projectBaseDir,vpathDir) 100 buildDir='' 101 102 if configuration['buildMethod']=='unixConfig' : 103 if 'SkipProjects' in configuration : 104 buildDir+="No"+configuration['SkipProjects'] 105 if 'noThirdParty' in configuration : 106 if configuration['noThirdParty'] : 107 buildDir+='-NoThirdParty' 108 buildDir=svnVersionFlattened+\ 109 configuration['configOptions']['unique']+\ 110 buildDir 111 buildDir=buildDir.replace(' ','') 112 buildDir=buildDir.replace('"','') 113 buildDir=buildDir.replace("'",'') 114 buildDir=buildDir.replace('--enable','') 115 if buildDir==svnVersionFlattened : buildDir+='-default' 116 117 fullBuildDir = os.path.join(projectBaseDir,buildDir) 104 118 105 119 NBlogMessages.writeMessage(' SVN source URL: '+svnCheckOutUrl) 106 120 NBlogMessages.writeMessage(' Checkout directory: '+projectCheckOutDir) 107 NBlogMessages.writeMessage(' Vpath directory: '+fullVpathDir)121 NBlogMessages.writeMessage(' Build directory: '+fullBuildDir) 108 122 109 123 110 124 #--------------------------------------------------------------------- 111 # Create the vpathdirectory if it doesn't exist125 # Create the build directory if it doesn't exist 112 126 # and remove file that indicates prior run tested ok. 113 127 #--------------------------------------------------------------------- 114 if not os.path.isdir(full VpathDir) :115 os.makedirs(full VpathDir)128 if not os.path.isdir(fullBuildDir) : 129 os.makedirs(fullBuildDir) 116 130 117 131 #--------------------------------------------------------------------- … … 120 134 #--------------------------------------------------------------------- 121 135 122 os.chdir(full VpathDir)136 os.chdir(fullBuildDir) 123 137 if os.path.isfile('NBallTestsPassed') : 124 138 msg=NBsvnCommand.newer(svnCheckOutUrl,projectCheckOutDir) … … 129 143 NBlogMessages.writeMessage(' '+msg) 130 144 131 # Must remove file NBallTestsPassed from all vpathdirectories that145 # Must remove file NBallTestsPassed from all build directories that 132 146 # use projectCheckoutDir for their source code. This is to ensure 133 # that make will be run in all the vpathdirs after "svn update"147 # that make will be run in all the build dirs after "svn update" 134 148 dirs = os.listdir("..") 135 149 for d in dirs : 136 if d.startswith(configuration['svnVersion']) and \ 137 d!=configuration['svnVersion']: 150 if d.startswith(configuration['svnVersion']) : 138 151 fileToBeRemoved=os.path.join("..",d,'NBallTestsPassed') 139 152 if os.path.isfile(fileToBeRemoved) : … … 203 216 NBlogMessages.writeMessage(' Skipped a new download into '+thirdPartyBaseDir) 204 217 205 #--------------------------------------------------------------------- 206 # Source is now available, so now it is time to run config 207 #--------------------------------------------------------------------- 208 skipOptions='' 209 210 if 'SkipProjects' in configuration : 211 skipOptions+=configuration['SkipProjects'] 212 213 # If needed create option for skipping 3rd party code 214 needSkip3PartySkipOptions=False 215 if 'noThirdParty' not in configuration : 216 needSkip3PartySkipOptions=True 217 elif configuration['noThirdParty'] : 218 needSkip3PartySkipOptions=True 219 if needSkip3PartySkipOptions : 220 thirdPartyBaseDir=os.path.join(projectCheckOutDir,'ThirdParty') 221 if os.path.isdir(thirdPartyBaseDir) : 222 thirdPartyDirs = os.listdir(thirdPartyBaseDir) 223 for d in thirdPartyDirs : 224 skipOptions+=' ThirdParty/'+d 225 226 if skipOptions!='' : 227 skipOptions=' COIN_SKIP_PROJECTS="'+skipOptions+'"' 228 229 os.chdir(fullVpathDir) 230 NBlogMessages.writeMessage(' Current directory: '+fullVpathDir) 231 232 # Assemble all config options together and create config command 233 configOptions ="-C "+configuration['configOptions']['unique'] 234 configOptions+=configuration['configOptions']['invariant'] 235 configOptions+=skipOptions 236 configCmd = os.path.join(projectCheckOutDir,"configure "+configOptions) 237 238 239 240 # If config was previously run, then no need to run again. 241 # if NBcheckResult.didConfigRunOK() : 242 # NBlogMessages.writeMessage(" configure previously ran. Not rerunning.") 243 # else : 244 NBlogMessages.writeMessage(" "+configCmd) 245 246 # Finally run config 247 result=NBosCommand.run(configCmd) 248 stdoutfile=open('NBconfig.stdout','w') 249 stdoutfile.write(result['stdout']) 250 stdoutfile.close() 251 stderrfile=open('NBconfig.stderr','w') 252 stderrfile.write(result['stderr']) 253 stderrfile.close() 254 255 # Check if configure worked 256 if result['returnCode'] != 0 : 257 error_msg = result 258 error_msg['configure flags']=configOptions 259 error_msg['svn version']=configuration['svnVersion'] 260 # Add contents of log file to message 261 logFileName = 'config.log' 262 if os.path.isfile(logFileName) : 263 logFilePtr = open(logFileName,'r') 264 error_msg['config.log'] = logFilePtr.read() 265 logFilePtr.close() 266 NBemail.sendCmdMsgs(configuration['project'],error_msg,configCmd) 267 return 268 269 #--------------------------------------------------------------------- 270 # Run make part of build 271 #--------------------------------------------------------------------- 272 NBlogMessages.writeMessage( ' make' ) 273 result=NBosCommand.run('make') 274 stdoutfile=open('NBmake.stdout','w') 275 stdoutfile.write(result['stdout']) 276 stdoutfile.close() 277 stderrfile=open('NBmake.stderr','w') 278 stderrfile.write(result['stderr']) 279 stderrfile.close() 280 281 # Check if make worked 282 if result['returnCode'] != 0 : 283 result['configure flags']=configOptions 284 result['svn version']=configuration['svnVersion'] 285 NBemail.sendCmdMsgs(configuration['project'],result,'make') 286 return 287 288 #--------------------------------------------------------------------- 289 # Run 'make test' part of build 290 #--------------------------------------------------------------------- 291 NBlogMessages.writeMessage( ' make test' ) 292 result=NBosCommand.run('make test') 293 stdoutfile=open('NBmaketest.stdout','w') 294 stdoutfile.write(result['stdout']) 295 stdoutfile.close() 296 stderrfile=open('NBmaketest.stderr','w') 297 stderrfile.write(result['stderr']) 298 stderrfile.close() 299 300 # Check if 'make test' worked 301 for testFunc in configuration['checkMakeTest'] : 302 testResultFail=testFunc(result,configuration['project']) 303 if testResultFail : 218 if configuration['buildMethod']=='unixConfig' : 219 #--------------------------------------------------------------------- 220 # Source is now available, so now it is time to run config 221 #--------------------------------------------------------------------- 222 skipOptions='' 223 224 if 'SkipProjects' in configuration : 225 skipOptions+=configuration['SkipProjects'] 226 227 # If needed create option for skipping 3rd party code 228 needSkip3PartySkipOptions=False 229 if 'noThirdParty' not in configuration : 230 needSkip3PartySkipOptions=True 231 elif configuration['noThirdParty'] : 232 needSkip3PartySkipOptions=True 233 if needSkip3PartySkipOptions : 234 thirdPartyBaseDir=os.path.join(projectCheckOutDir,'ThirdParty') 235 if os.path.isdir(thirdPartyBaseDir) : 236 thirdPartyDirs = os.listdir(thirdPartyBaseDir) 237 for d in thirdPartyDirs : 238 skipOptions+=' ThirdParty/'+d 239 240 if skipOptions!='' : 241 skipOptions=' COIN_SKIP_PROJECTS="'+skipOptions+'"' 242 243 os.chdir(fullBuildDir) 244 NBlogMessages.writeMessage(' Current directory: '+fullBuildDir) 245 246 # Assemble all config options together and create config command 247 configOptions ="-C "+configuration['configOptions']['unique'] 248 configOptions+=configuration['configOptions']['invariant'] 249 configOptions+=skipOptions 250 configCmd = os.path.join(projectCheckOutDir,"configure "+configOptions) 251 252 253 254 # If config was previously run, then no need to run again. 255 # if NBcheckResult.didConfigRunOK() : 256 # NBlogMessages.writeMessage(" configure previously ran. Not rerunning.") 257 # else : 258 NBlogMessages.writeMessage(" "+configCmd) 259 260 # Finally run config 261 result=NBosCommand.run(configCmd) 262 stdoutfile=open('NBconfig.stdout','w') 263 stdoutfile.write(result['stdout']) 264 stdoutfile.close() 265 stderrfile=open('NBconfig.stderr','w') 266 stderrfile.write(result['stderr']) 267 stderrfile.close() 268 269 # Check if configure worked 270 if result['returnCode'] != 0 : 271 error_msg = result 272 error_msg['configure flags']=configOptions 273 error_msg['svn version']=configuration['svnVersion'] 274 # Add contents of log file to message 275 logFileName = 'config.log' 276 if os.path.isfile(logFileName) : 277 logFilePtr = open(logFileName,'r') 278 error_msg['config.log'] = logFilePtr.read() 279 logFilePtr.close() 280 NBemail.sendCmdMsgs(configuration['project'],error_msg,configCmd) 281 return 282 283 #--------------------------------------------------------------------- 284 # Run make part of build 285 #--------------------------------------------------------------------- 286 NBlogMessages.writeMessage( ' make' ) 287 result=NBosCommand.run('make') 288 stdoutfile=open('NBmake.stdout','w') 289 stdoutfile.write(result['stdout']) 290 stdoutfile.close() 291 stderrfile=open('NBmake.stderr','w') 292 stderrfile.write(result['stderr']) 293 stderrfile.close() 294 295 # Check if make worked 296 if result['returnCode'] != 0 : 304 297 result['configure flags']=configOptions 305 298 result['svn version']=configuration['svnVersion'] 306 result['make test']=testResultFail 307 NBemail.sendCmdMsgs(configuration['project'],result,"make test") 299 NBemail.sendCmdMsgs(configuration['project'],result,'make') 308 300 return 309 301 310 311 #--------------------------------------------------------------------- 312 # Run unitTest if available and different from 'make test' 313 #--------------------------------------------------------------------- 314 if "unitTest" in configuration : 315 unitTestRelPath=configuration['unitTest']['path'] 316 unitTestPath = os.path.join(fullVpathDir,unitTestRelPath) 317 os.chdir(unitTestPath) 318 NBlogMessages.writeMessage(' Current directory: '+unitTestPath) 319 320 unitTestCmdTemplate=configuration['unitTest']['command'] 321 322 dataBaseDir=os.path.join(configuration['rootDir'],'Data') 323 netlibDir=os.path.join(dataBaseDir,'Netlib') 324 miplib3Dir=os.path.join(dataBaseDir,'miplib3') 325 326 unitTestCmd=unitTestCmdTemplate.replace('_NETLIBDIR_',netlibDir) 327 unitTestCmd=unitTestCmd.replace('_MIPLIB3DIR_',miplib3Dir) 328 329 NBlogMessages.writeMessage( ' '+unitTestCmd ) 330 result=NBosCommand.run(unitTestCmd) 331 stdoutfile=open('NBunittest.stdout','w') 302 #--------------------------------------------------------------------- 303 # Run 'make test' part of build 304 #--------------------------------------------------------------------- 305 if configuration['buildMethod']=='unixConfig' : 306 NBlogMessages.writeMessage( ' make test' ) 307 result=NBosCommand.run('make test') 308 stdoutfile=open('NBmaketest.stdout','w') 332 309 stdoutfile.write(result['stdout']) 333 310 stdoutfile.close() 334 stderrfile=open('NB unittest.stderr','w')311 stderrfile=open('NBmaketest.stderr','w') 335 312 stderrfile.write(result['stderr']) 336 313 stderrfile.close() 337 314 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'] : 315 # Check if 'make test' worked 316 for testFunc in configuration['checkMakeTest'] : 347 317 testResultFail=testFunc(result,configuration['project']) 348 318 if testResultFail : 349 319 result['configure flags']=configOptions 350 320 result['svn version']=configuration['svnVersion'] 351 result[' unitTest']=testResultFail352 NBemail.sendCmdMsgs(configuration['project'],result, unitTestCmd)321 result['make test']=testResultFail 322 NBemail.sendCmdMsgs(configuration['project'],result,"make test") 353 323 return 354 324 325 if configuration['buildMethod']=='msSln' : 326 #--------------------------------------------------------------------- 327 # Source is now available, so now it is time to run vcbuild 328 #--------------------------------------------------------------------- 329 330 os.chdir(projectCheckOutDir) 331 NBlogMessages.writeMessage(' Current directory: '+projectCheckOutDir) 332 333 if configuration.has_key('slnFile') : 334 slnFileName = os.path.join(projectCheckOutDir,configuration['slnFile']) 335 else : 336 slnFileName = os.path.join(projectCheckOutDir,\ 337 configuration['project'],\ 338 'MSVisualStudio',\ 339 'v8',\ 340 configuration['project']) +\ 341 '.sln' 342 if not os.path.isfile(slnFileName) : 343 NBlogMessages.writeMessage(" Solution file does not exist: "+slnFileName) 344 return 345 346 vcbuild='vcbuild /u ' + slnFileName + ' $ALL' 347 348 349 NBlogMessages.writeMessage(" "+vcbuild) 350 351 # Finally run vcbuild 352 result=NBosCommand.run(vcbuild) 353 stdoutfile=open('NBvcbuild.stdout','w') 354 stdoutfile.write(result['stdout']) 355 stdoutfile.close() 356 stderrfile=open('NBvcbuild.stderr','w') 357 stderrfile.write(result['stderr']) 358 stderrfile.close() 359 360 # Check if vcbuild worked 361 if result['returnCode'] != 0 : 362 error_msg = result 363 error_msg['svn version']=configuration['svnVersion'] 364 NBemail.sendCmdMsgs(configuration['project'],error_msg,vcbuild) 365 return 366 367 #--------------------------------------------------------------------- 368 # Run unitTest if available and different from 'make test' 369 #--------------------------------------------------------------------- 370 if configuration['buildMethod']=='unixConfig' : 371 if "unitTest" in configuration : 372 unitTestRelPath=configuration['unitTest']['path'] 373 unitTestPath = os.path.join(fullBuildDir,unitTestRelPath) 374 os.chdir(unitTestPath) 375 NBlogMessages.writeMessage(' Current directory: '+unitTestPath) 376 377 unitTestCmdTemplate=configuration['unitTest']['command'] 378 379 dataBaseDir=os.path.join(configuration['rootDir'],'Data') 380 netlibDir=os.path.join(dataBaseDir,'Netlib') 381 miplib3Dir=os.path.join(dataBaseDir,'miplib3') 382 383 unitTestCmd=unitTestCmdTemplate.replace('_NETLIBDIR_',netlibDir) 384 unitTestCmd=unitTestCmd.replace('_MIPLIB3DIR_',miplib3Dir) 385 386 NBlogMessages.writeMessage( ' '+unitTestCmd ) 387 result=NBosCommand.run(unitTestCmd) 388 stdoutfile=open('NBunittest.stdout','w') 389 stdoutfile.write(result['stdout']) 390 stdoutfile.close() 391 stderrfile=open('NBunittest.stderr','w') 392 stderrfile.write(result['stderr']) 393 stderrfile.close() 394 395 for testFunc in configuration['unitTest']['checkUnitTest'] : 396 testResultFail=testFunc(result,configuration['project']) 397 if testResultFail : 398 result['configure flags']=configOptions 399 result['svn version']=configuration['svnVersion'] 400 result['unitTest']=testResultFail 401 NBemail.sendCmdMsgs(configuration['project'],result,unitTestCmd) 402 return 403 404 if configuration['buildMethod']=='msSln' : 405 #--------------------------------------------------------------------- 406 # Run all test executables 407 #--------------------------------------------------------------------- 408 if "test" in configuration : 409 for t in range( len(configuration['test']) ) : 410 testRelDir=configuration['test'][t]['dir'] 411 testDir = os.path.join(projectCheckOutDir,testRelDir) 412 os.chdir(testDir) 413 NBlogMessages.writeMessage(' Current directory: '+testDir) 414 415 testCmd=configuration['test'][t]['cmd'] 416 417 NBlogMessages.writeMessage( ' '+testCmd ) 418 result=NBosCommand.run(testCmd) 419 stdoutfile=open('NBtest.stdout','w') 420 stdoutfile.write(result['stdout']) 421 stdoutfile.close() 422 stderrfile=open('NBtest.stderr','w') 423 stderrfile.write(result['stderr']) 424 stderrfile.close() 425 426 for testFunc in configuration['test'][t]['check'] : 427 testResultFail=testFunc(result,configuration['project']) 428 if testResultFail : 429 result['svn version']=configuration['svnVersion'] 430 result['unitTest']=testResultFail 431 NBemail.sendCmdMsgs(configuration['project'],result,testCmd) 432 return 433 355 434 356 435 #--------------------------------------------------------------------- 357 436 # Everything build and all tests passed. 358 437 #--------------------------------------------------------------------- 359 os.chdir(full VpathDir)438 os.chdir(fullBuildDir) 360 439 f=open('NBallTestsPassed','w') 361 440 f.close() -
branches/testScripts/NBprojectConfig.py
r730 r739 21 21 CHECK_MAKE_TEST = {} 22 22 CHECK_UNITTEST = {} 23 SLN_BLD_TEST = {} 24 CFG_BLD_TEST = {} 25 SLN_FILE = {} 23 26 24 27 … … 28 31 CHECK_MAKE_TEST['CoinUtils']=[NBcheckResult.rc0, 29 32 NBcheckResult.standardSuccessMessage] 33 CFG_BLD_TEST['CoinUtils']=[ 34 {'dir':'', 35 'cmd':'make test', 36 'check':[ NBcheckResult.rc0, 37 NBcheckResult.standardSuccessMessage ] } ] 30 38 #does not have references to third party packages 31 39 … … 42 50 NBcheckResult.standardSuccessMessage, 43 51 NBcheckResult.noSolverInterfaceTestingIssueMessage] 52 53 CFG_BLD_TEST['DyLP']=[ 54 {'dir':'', 55 'cmd':'make test', 56 'check':[ NBcheckResult.rc0, 57 NBcheckResult.standardSuccessMessage, 58 NBcheckResult.noSolverInterfaceTestingIssueMessage ] }, 59 {'dir':'Osi/test', 60 'cmd':'./unitTest -testOsiSolverInterface -netlibDir=_NETLIBDIR_ -cerr2cout', 61 'check':[ NBcheckResult.rc0, 62 NBcheckResult.standardSuccessMessage, 63 NBcheckResult.endWithWoodw, 64 NBcheckResult.noSolverInterfaceTestingIssueMessage] } ] 65 44 66 #does not have references to third party packages 45 67 … … 47 69 PROJECT_EMAIL_ADDRS['Clp'] = 'jjforre _AT_ us _DOT_ ibm _DOT_ com' 48 70 UNITTEST_DIR['Clp'] = os.path.join('Clp','src') 49 UNITTEST_CMD['Clp'] = './clp -unitTest dirNetlib=_NETLIBDIR_ -netlib'71 UNITTEST_CMD['Clp'] = './clp -unitTest -dirNetlib=_NETLIBDIR_ -netlib' 50 72 CHECK_MAKE_TEST['Clp']=[ 51 73 NBcheckResult.rc0, … … 55 77 NBcheckResult.standardSuccessMessage, 56 78 NBcheckResult.endWithWoodw] 79 80 CFG_BLD_TEST['Clp']=[ 81 {'dir':'', 82 'cmd':'make test', 83 'check':[ NBcheckResult.rc0, 84 NBcheckResult.standardSuccessMessage ] }, 85 {'dir':'Clp/Src', 86 'cmd':'./clp -unitTest -dirNetlib=_NETLIBDIR_ -netlib', 87 'check':[ NBcheckResult.rc0, 88 NBcheckResult.standardSuccessMessage, 89 NBcheckResult.endWithWoodw] } ] 90 SLN_BLD_TEST['Clp']=[ 91 {'dir':r'Clp\MSVisualStudio\v8\clp\Release', 92 'cmd':'clp -dirSample=_SAMPLEDIR_ -unitTest -dirNetlib=_NETLIBDIR_ -netlib', 93 'check':[ NBcheckResult.rc0, 94 NBcheckResult.standardSuccessMessage, 95 NBcheckResult.endWithWoodw] }, 96 {'dir':r'Clp\MSVisualStudio\v8\clp\Debug', 97 'cmd':'clp -dirSample=_SAMPLEDIR_ -unitTest -dirNetlib=_NETLIBDIR_ -netlib', 98 'check':[ NBcheckResult.rc0, 99 NBcheckResult.standardSuccessMessage, 100 NBcheckResult.endWithWoodw] } ] 57 101 58 102 #---------------------------------------------------------------------- … … 67 111 NBcheckResult.standardSuccessMessage, 68 112 ] 113 CFG_BLD_TEST['SYMPHONY']=[ 114 {'dir':'', 115 'cmd':'make test', 116 'check':[ NBcheckResult.rc0, 117 NBcheckResult.standardSuccessMessage ] }, 118 {'dir':'', 119 'cmd':'make fulltest', 120 'check':[ NBcheckResult.rc0, 121 NBcheckResult.standardSuccessMessage ] } ] 122 SLN_BLD_TEST['SYMPHONY']=[ { 123 'dir':r'SYMPHONY\MSVisualStudio\v8\Release', 124 'cmd':r'symphony -F _NETLIBDIR_\25fv47.mps', 125 'check':[ NBcheckResult.rc0 ] }, 126 {'dir':r'SYMPHONY\MSVisualStudio\v8\Debug', 127 'cmd':r'symphony -F _NETLIBDIR_\25fv47.mps', 128 'check':[ NBcheckResult.rc0 ] } ] 69 129 70 130 #---------------------------------------------------------------------- … … 72 132 CHECK_MAKE_TEST['Vol']=[ 73 133 NBcheckResult.rc0] 134 CFG_BLD_TEST['Vol']=[ 135 {'dir':'', 136 'cmd':'make test', 137 'check':[ NBcheckResult.rc0 ] } ] 74 138 #does not have references to third party packages 75 139 … … 86 150 NBcheckResult.standardSuccessMessage, 87 151 NBcheckResult.noSolverInterfaceTestingIssueMessage] 152 CFG_BLD_TEST['Osi']=[ 153 {'dir':'', 154 'cmd':'make test', 155 'check':[ NBcheckResult.rc0, 156 NBcheckResult.standardSuccessMessage, 157 NBcheckResult.noSolverInterfaceTestingIssueMessage ] }, 158 {'dir':'Osi/test', 159 'cmd':'./unitTest -testOsiSolverInterface -netlibDir=_NETLIBDIR_ -cerr2cout', 160 'check':[ NBcheckResult.rc0, 161 NBcheckResult.standardSuccessMessage, 162 NBcheckResult.noSolverInterfaceTestingIssueMessage] } ] 163 164 SLN_BLD_TEST['Osi']=[ 165 {'dir':r'Osi\MSVisualStudio\v8\OsiExamplesBuild\Release', 166 'cmd':'OsiExamplesBuild', 167 'check':[ NBcheckResult.rc0 ] }, 168 {'dir':r'Osi\MSVisualStudio\v8\OsiExamplesBuild\Debug', 169 'cmd':'OsiExamplesBuild', 170 'check':[ NBcheckResult.rc0 ] } ] 88 171 89 172 #---------------------------------------------------------------------- … … 92 175 NBcheckResult.rc0, 93 176 NBcheckResult.standardSuccessMessage] 177 CFG_BLD_TEST['Cgl']=[ 178 {'dir':'', 179 'cmd':'make test', 180 'check':[ NBcheckResult.rc0, 181 NBcheckResult.standardSuccessMessage ] } ] 94 182 #does not have references to third party packages 95 183 … … 103 191 CHECK_UNITTEST['Cbc']=[ NBcheckResult.rc0to2 ] 104 192 193 CFG_BLD_TEST['Cbc']=[ 194 {'dir':'', 195 'cmd':'make test', 196 'check':[ NBcheckResult.rc0, 197 NBcheckResult.cbcMakeTestSuccessMessage ] }, 198 {'dir':'Cbc/Src', 199 'cmd':'./cbc -unitTest -dirMiplib=_MIPLIB3DIR_ -miplib', 200 'check':[ NBcheckResult.rc0to2 ] } ] 201 202 SLN_BLD_TEST['Cbc']=[ 203 {'dir':r'Cbc\MSVisualStudio\v8\cbcSolve\Release', 204 'cmd':'cbcSolve -dirSample=_SAMPLEDIR_ -unitTest -dirMiplib=_MIPLIB3DIR_ -miplib', 205 'check':[ NBcheckResult.rc0to2 ] }, 206 {'dir':r'Cbc\MSVisualStudio\v8\cbcSolve\Debug', 207 'cmd':'cbcSolve -dirSample=_SAMPLEDIR_ -unitTest -dirMiplib=_MIPLIB3DIR_ -miplib', 208 'check':[ NBcheckResult.rc0to2 ] } ] 209 105 210 #---------------------------------------------------------------------- 106 211 PROJECT_EMAIL_ADDRS['Ipopt'] = 'andreasw _AT_ us _DOT_ ibm _DOT_ com' … … 108 213 # ,NBcheckResult.standardSuccessMessage 109 214 ] 215 CFG_BLD_TEST['Ipopt']=[ 216 {'dir':'', 217 'cmd':'make test', 218 'check':[ NBcheckResult.rc0 219 #,NBcheckResult.standardSuccessMessage 220 ] } ] 110 221 #third party packages are not optional here 111 222 … … 115 226 ,NBcheckResult.standardSuccessMessage 116 227 ] 228 CFG_BLD_TEST['Bonmin']=[ 229 {'dir':'', 230 'cmd':'make test', 231 'check':[ NBcheckResult.rc0, 232 NBcheckResult.standardSuccessMessage ] } ] 117 233 #third party packages are not optional here 118 234 … … 122 238 NBcheckResult.rc0, 123 239 NBcheckResult.standardSuccessMessage] 240 CFG_BLD_TEST['FlopC++']=[ 241 {'dir':'', 242 'cmd':'make test', 243 'check':[ NBcheckResult.rc0, 244 NBcheckResult.cbcMakeTestSuccessMessage ] } ] 245 SLN_FILE['FlopC++']=r'FlopCpp\MSVisualStudio\v8\FlopCpp.sln' 246 SLN_BLD_TEST['FlopC++']=[ 247 {'dir':r'FlopCpp\MSVisualStudio\v8\Release', 248 'cmd':'unitTest -dirSample=_SAMPLEDIR_ -unitTest -dirNetlib=_NETLIBDIR_ -netlib', 249 'check':[ NBcheckResult.rc0, 250 NBcheckResult.standardSuccessMessage ] }, 251 {'dir':r'FlopCpp\MSVisualStudio\v8\Debug', 252 'cmd':'unitTest -dirSample=_SAMPLEDIR_ -unitTest -dirNetlib=_NETLIBDIR_ -netlib', 253 'check':[ NBcheckResult.rc0, 254 NBcheckResult.standardSuccessMessage ] } ] 255 124 256 #does not have references to third party packages 125 257 … … 129 261 NBcheckResult.rc0, 130 262 NBcheckResult.standardSuccessMessage] 263 CFG_BLD_TEST['OS']=[ 264 {'dir':'', 265 'cmd':'make test', 266 'check':[ NBcheckResult.rc0, 267 NBcheckResult.cbcMakeTestSuccessMessage ] } ] 131 268 #third party packages are not optional if Ipopt is not excluded 132 269 … … 136 273 UNITTEST_DIR['CppAD'] = os.path.join('.') 137 274 UNITTEST_CMD['CppAD'] = './example/example' 138 CHECK_UNITTEST['CppAD']=[NBcheckResult.rc0] 275 CHECK_UNITTEST['CppAD']=[NBcheckResult.rc0] 276 277 CFG_BLD_TEST['CppAD']=[ 278 {'dir':'', 279 'cmd':'./example/example', 280 'check':[ NBcheckResult.rc0 ] } ] 139 281 #does not have references to third party packages 140 282 … … 144 286 NBcheckResult.rc0, 145 287 NBcheckResult.standardSuccessMessage] 288 CFG_BLD_TEST['Smi']=[ 289 {'dir':'', 290 'cmd':'make test', 291 'check':[ NBcheckResult.rc0 ] } ] 292 SLN_BLD_TEST['Smi']=[ 293 {'dir':r'Smi\MSVisualStudio\v8\unitTest\Release', 294 'cmd':'unitTest -dirSample=_SAMPLEDIR_ -unitTest -dirNetlib=_NETLIBDIR_ -netlib', 295 'check':[ NBcheckResult.rc0, 296 NBcheckResult.standardSuccessMessage ] }, 297 {'dir':r'Smi\MSVisualStudio\v8\unitTest\Debug', 298 'cmd':'unitTest -dirSample=_SAMPLEDIR_ -unitTest -dirNetlib=_NETLIBDIR_ -netlib', 299 'check':[ NBcheckResult.rc0, 300 NBcheckResult.standardSuccessMessage ] } ] 146 301 #does not have references to third party packages 147 302 #TODO: need some check whether make test was successful; what is the behaviour in Smi's unittest if it fails? -
branches/testScripts/README
- Property svn:eol-style set to native
r714 r739 27 27 The output of get.XXX scripts, configure, make, unittests to stdout and stderr is also stored in the build directories for later analysis (e.g., NBmake.stdout). 28 28 29 To install and use NightlyBuil eplease see the INSTALL file.29 To install and use NightlyBuild please see the INSTALL file. -
branches/testScripts/nightlyBuild.py
r734 r739 49 49 if not os.path.isdir(dataBaseDir) : 50 50 os.makedirs(dataBaseDir) 51 dataDirs=['Netlib','miplib3' ]51 dataDirs=['Netlib','miplib3','Sample'] 52 52 for d in dataDirs : 53 53 dataDir=os.path.join(dataBaseDir,d) 54 54 if not os.path.isdir(dataDir) : 55 svnCmd='svn checkout https://projects.coin-or.org/svn/Data/releases/1.0. 0/'+d+' '+d55 svnCmd='svn checkout https://projects.coin-or.org/svn/Data/releases/1.0.4/'+d+' '+d 56 56 if NBsvnCommand.run(svnCmd,dataBaseDir,'Data')!='OK' : 57 57 sys.exit(1) … … 59 59 netlibDir=os.path.join(dataBaseDir,'Netlib') 60 60 miplib3Dir=os.path.join(dataBaseDir,'miplib3') 61 62 #------------------------------------------------------------------------ 63 # Loop once for each project (get code, compile & link, and test). 61 sampleDir=os.path.join(dataBaseDir,'Sample') 62 63 #------------------------------------------------------------------------ 64 # Define loop invariant configuration values 64 65 #------------------------------------------------------------------------ 65 66 configuration={} 66 67 configuration['rootDir']=NIGHTLY_BUILD_ROOT_DIR 67 #for p,buildConfigs in NBprojectConfig.BUILDS.iteritems(): 68 configurations = set("") 69 70 #------------------------------------------------------------------------ 71 # Define how code is is to be built. Choices are: 72 # msSoln: use microsoft compiler with a solution (sln) file. 73 # unixConfig: use sequence "./configure", "make", "make test" 74 #------------------------------------------------------------------------ 75 if sys.platform=='win32' : 76 configuration['buildMethod']='msSln' 77 else : 78 configuration['buildMethod']='unixConfig' 79 80 #------------------------------------------------------------------------ 81 # Loop once for each project (get code, compile & link, and test). 82 #------------------------------------------------------------------------ 68 83 for p in PROJECTS : 69 84 … … 116 131 117 132 #-------------------------------------------------------------------- 118 # Setup usage of 3rd Party code 119 #-------------------------------------------------------------------- 120 if 'noThirdParty' in configuration: configuration.pop('noThirdParty') 121 if 'ThirdParty' in bc: 122 if bc['ThirdParty'].lower()=='yes' : 123 configuration['noThirdParty']=False 124 else: 125 configuration['noThirdParty']=True 126 127 #-------------------------------------------------------------------- 128 # Set config options 129 #-------------------------------------------------------------------- 130 configuration['configOptions']={} 131 configuration['configOptions']['unique']="" 132 configuration['configOptions']['invariant']="" 133 if 'OptLevel' not in bc : 134 print 'Error. BUILDS does not contain OptLevel' 135 print ' Project is '+p 136 print ' BuildConfig is '+str(bc) 137 sys.exit(1) 138 if bc['OptLevel']=='Debug' : 139 configuration['configOptions']['unique']+=" --enable-debug" 140 if 'AdditionalConfigOptions' in bc : 141 configuration['configOptions']['unique']+=" "+bc['AdditionalConfigOptions'] 142 143 configuration['configOptions']['invariant']+=" "+ CONFIGURE_FLAGS 144 145 #-------------------------------------------------------------------- 146 # Deal with coin projects to be skipped by ./config 147 #-------------------------------------------------------------------- 148 if 'SkipProjects' in configuration: configuration.pop('SkipProjects') 149 if 'SkipProjects' in bc : 150 configuration['SkipProjects']=bc['SkipProjects'] 151 152 #--------------------------------------------------------------------- 153 # Setup checkMakeTest 154 #--------------------------------------------------------------------- 155 #configuration['checkMakeTest']=NBcheckResult.didTestFail 156 configuration['checkMakeTest']=NBprojectConfig.CHECK_MAKE_TEST[p] 157 158 159 #--------------------------------------------------------------------- 160 # Set up unitTest 161 #--------------------------------------------------------------------- 162 configuration['unitTest']={} 163 if NBprojectConfig.UNITTEST_CMD.has_key(p) : 164 165 unitTestCmdTemplate=NBprojectConfig.UNITTEST_CMD[p] 166 unitTestCmd=unitTestCmdTemplate.replace('_NETLIBDIR_',netlibDir) 167 unitTestCmd=unitTestCmd.replace('_MIPLIB3DIR_',miplib3Dir) 168 169 configuration['unitTest']['command']=unitTestCmd 170 configuration['unitTest']['checkUnitTest']=NBprojectConfig.CHECK_UNITTEST[p] 171 configuration['unitTest']['path']=NBprojectConfig.UNITTEST_DIR[p] 172 173 else : 174 # No unitTest so remove from configuration 175 configuration.pop('unitTest') 133 # Process Parameters that are used by unix configure style build 134 #-------------------------------------------------------------------- 135 if configuration['buildMethod']=='unixConfig' : 136 #-------------------------------------------------------------------- 137 # Doing a unix config type build. Grab unix config parms 138 #-------------------------------------------------------------------- 139 140 #-------------------------------------------------------------------- 141 # Setup usage of 3rd Party code 142 #-------------------------------------------------------------------- 143 if 'noThirdParty' in configuration: configuration.pop('noThirdParty') 144 if 'ThirdParty' in bc: 145 if bc['ThirdParty'].lower()=='yes' : 146 configuration['noThirdParty']=False 147 else: 148 configuration['noThirdParty']=True 149 150 #-------------------------------------------------------------------- 151 # Set config options 152 #-------------------------------------------------------------------- 153 configuration['configOptions']={} 154 configuration['configOptions']['unique']="" 155 configuration['configOptions']['invariant']="" 156 if 'OptLevel' not in bc : 157 print 'Error. BUILDS does not contain OptLevel' 158 print ' Project is '+p 159 print ' BuildConfig is '+str(bc) 160 sys.exit(1) 161 if bc['OptLevel']=='Debug' : 162 configuration['configOptions']['unique']+=" --enable-debug" 163 if 'AdditionalConfigOptions' in bc : 164 configuration['configOptions']['unique']+=" "+bc['AdditionalConfigOptions'] 165 166 configuration['configOptions']['invariant']+=" "+ CONFIGURE_FLAGS 167 168 #-------------------------------------------------------------------- 169 # Deal with coin projects to be skipped by ./config 170 #-------------------------------------------------------------------- 171 if 'SkipProjects' in configuration: configuration.pop('SkipProjects') 172 if 'SkipProjects' in bc : 173 configuration['SkipProjects']=bc['SkipProjects'] 174 175 #--------------------------------------------------------------------- 176 # Setup checkMakeTest 177 #--------------------------------------------------------------------- 178 configuration['checkMakeTest']=NBprojectConfig.CHECK_MAKE_TEST[p] 179 180 181 #--------------------------------------------------------------------- 182 # Set up unitTest 183 #--------------------------------------------------------------------- 184 configuration['unitTest']={} 185 if NBprojectConfig.UNITTEST_CMD.has_key(p) : 186 187 unitTestCmdTemplate=NBprojectConfig.UNITTEST_CMD[p] 188 unitTestCmd=unitTestCmdTemplate.replace('_NETLIBDIR_',netlibDir) 189 unitTestCmd=unitTestCmd.replace('_MIPLIB3DIR_',miplib3Dir) 190 unitTestCmd=unitTestCmd.replace('_SAMPLEDIR_',sampleDir) 191 192 configuration['unitTest']['command']=unitTestCmd 193 configuration['unitTest']['checkUnitTest']=NBprojectConfig.CHECK_UNITTEST[p] 194 configuration['unitTest']['path']=NBprojectConfig.UNITTEST_DIR[p] 195 196 else : 197 # No unitTest so remove from configuration 198 configuration.pop('unitTest') 199 200 if configuration['buildMethod']=='msSln' : 201 #-------------------------------------------------------------------- 202 # Doing a microsoft solution build. Grap ms sln parms 203 #-------------------------------------------------------------------- 204 205 #--------------------------------------------------------------------- 206 # Set up test executables 207 #--------------------------------------------------------------------- 208 configuration['test']={} 209 if NBprojectConfig.SLN_BLD_TEST.has_key(p) : 210 211 configuration['test']=NBprojectConfig.SLN_BLD_TEST[p] 212 for t in range( len(configuration['test']) ) : 213 testCmd=configuration['test'][t]['cmd'] 214 testCmd=testCmd.replace('_NETLIBDIR_',netlibDir) 215 testCmd=testCmd.replace('_MIPLIB3DIR_',miplib3Dir) 216 testCmd=testCmd.replace('_SAMPLEDIR_',sampleDir) 217 configuration['test'][t]['cmd']=testCmd 218 219 else : 220 # No test executables so remove from configuration 221 configuration.pop('test') 222 223 #--------------------------------------------------------------------- 224 # If solution file is not in standard place then specify it's location 225 #--------------------------------------------------------------------- 226 configuration['slnFile']='' 227 if NBprojectConfig.SLN_FILE.has_key(p) : 228 configuration['slnFile']=NBprojectConfig.SLN_FILE[p] 229 else : 230 configuration.pop('slnFile') 176 231 177 232 #-------------------------------------------------- 178 # Build & Test the configuration 233 # Build & Test the configuration, if not previously done 179 234 #-------------------------------------------------- 180 NBbuildConfig.run(configuration) 235 if str(configuration) not in configurations : 236 NBbuildConfig.run(configuration) 237 configurations=configurations | set([str(configuration)]) 238 181 239 182 240
Note: See TracChangeset
for help on using the changeset viewer.