- Timestamp:
- Oct 28, 2007 10:36:08 AM (13 years ago)
- Location:
- branches/testScripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/testScripts/NBcheckResult.py
r718 r720 11 11 import NBprojectConfig 12 12 13 14 13 #------------------------------------------------------------------------ 15 14 # Determine if a projects "make test" or unitTest ran successfully. … … 17 16 # this function has specialized code for some projects. 18 17 #------------------------------------------------------------------------ 18 19 def rc0( result, project ) : 20 retVal = None 21 # If the return code is not 0, then failure 22 if result['returnCode'] != 0 : 23 retVal = "Non-zero return code of "+str(result['returnCode']) 24 25 def standardSuccessMessage(result,project) : 26 retVal = None 27 # Is the success message contained in the output? 28 if result['stderr'].rfind("All tests completed successfully") == -1 and \ 29 result['stdout'].rfind("All tests completed successfully") == -1 : 30 # Success message not found, assume test failed 31 retVal = "The output does not contain the messages: 'All tests completed successfully'" 32 33 34 19 35 def didTestFail( result, project, buildStep ) : 20 36 retVal = None 21 37 22 38 # If the return code is not 0, then failure 23 if result['returnCode'] != 0 :24 retVal = "Non-zero return code of "+str(result['returnCode'])39 retVal=rc0(result,project) 40 if retVal : return retVal 25 41 26 42 # Many tests write a "Success" message. … … 28 44 if NBprojectConfig.ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS.has_key(project) : 29 45 if buildStep in NBprojectConfig.ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS[project] : 30 # Is the success message contained in the output? 31 if result['stderr'].rfind("All tests completed successfully") == -1 and \ 32 result['stdout'].rfind("All tests completed successfully") == -1 : 33 # Success message not found, assume test failed 34 retVal = "The output does not contain the messages: 'All tests completed successfully'" 46 retVal= standardSucessMessage(result,project) 47 if retVal : return retVal 35 48 36 49 #--------------------------------------------------------------------- -
branches/testScripts/NBprojectConfig.py
r718 r720 7 7 8 8 import os 9 import NBcheckResult 9 10 10 11 #---------------------------------------------------------------------- … … 18 19 UNITTEST_CMD = {} 19 20 ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS = {} 21 CHECK_MAKE_TEST = {} 22 CHECK_UNITTEST = {} 20 23 21 24 … … 24 27 PROJECT_EMAIL_ADDRS['CoinUtils'] = 'ladanyi _AT_ us _DOT_ ibm _DOT_ com' 25 28 ALL_TESTS_COMPLETED_SUCCESSFULLY_CMDS['CoinUtils'] = ['make test'] 29 CHECK_MAKE_TEST['CoinUtils']=[NBcheckRsult.rc0,NBcheckResult.standardSuccessMessage] 26 30 #does not have references to third party packages 27 31
Note: See TracChangeset
for help on using the changeset viewer.