Changeset 65317 in vbox for trunk/src/VBox/ValidationKit/testmanager/batch
- Timestamp:
- Jan 16, 2017 11:37:48 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 112891
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/batch/virtual_test_sheriff.py
r65306 r65317 328 328 return 0; 329 329 330 def getFailureReason(self, tReason): 331 """ Gets the failure reason object for tReason. """ 332 return self.oFailureReasonLogic.cachedLookupByNameAndCategory(tReason[1], tReason[0]); 330 333 331 334 def selfCheck(self): … … 335 338 if sAttr.startswith('ktReason_'): 336 339 tReason = getattr(self.__class__, sAttr); 337 oFailureReason = self. oFailureReasonLogic.cachedLookupByNameAndCategory(tReason[1], tReason[0]);340 oFailureReason = self.getFailureReason(tReason); 338 341 if oFailureReason is None: 339 342 rcExit = self.eprint(u'Failed to find failure reason "%s" in category "%s" in the database!' … … 366 369 367 370 # 371 # Generate a list of failures reasons we consider bad-testbox behavior. 372 # 373 aidFailureReasons = [ 374 self.getFailureReason(self.ktReason_Host_DriverNotUnloading).idFailureReason, 375 ]; 376 377 # 368 378 # Get list of bad test boxes for given period and check them out individually. 369 379 # 370 aidBadTestBoxes = self.oTestSetLogic.fetchBadTestBoxIds(cHoursBack = cHoursBack, tsNow = tsNow); 380 aidBadTestBoxes = self.oTestSetLogic.fetchBadTestBoxIds(cHoursBack = cHoursBack, tsNow = tsNow, 381 aidFailureReasons = aidFailureReasons); 371 382 for idTestBox in aidBadTestBoxes: 372 383 # Skip if the testbox is already disabled or has a pending reboot command. … … 394 405 cBad += 1; 395 406 else: 396 ## @todo maybe check the elapsed time here, it could still be a bad run. 397 cOkay += 1; 398 if iFirstOkay > iSet: 399 iFirstOkay = iSet; 407 # Check for bad failure reasons. 408 oFailure = None; 409 if oSet.enmStatus in TestSetData.kasBadTestStatuses: 410 oFailure = self.oTestResultFailureLogic.getById(oSet.idTestResult); 411 if oFailure is not None and oFailure.idFailureReason in aidFailureReasons: 412 cBad += 1; 413 else: 414 # This is an okay test result then. 415 ## @todo maybe check the elapsed time here, it could still be a bad run? 416 cOkay += 1; 417 if iFirstOkay > iSet: 418 iFirstOkay = iSet; 400 419 if iSet > 10: 401 420 break; … … 522 541 # 523 542 for idTestResult, tReason in dReasonForResultId.items(): 524 oFailureReason = self. oFailureReasonLogic.cachedLookupByNameAndCategory(tReason[1], tReason[0]);543 oFailureReason = self.getFailureReason(tReason); 525 544 if oFailureReason is not None: 526 545 sComment = 'Set by $Revision$' # Handy for reverting later. … … 641 660 an uninstall first and will be seeing similar issues to the uninstall. 642 661 """ 662 _ = fInstall; 663 643 664 atSimple = self.katSimpleInstallUninstallMainLogReasons; 644 665 if oCaseFile.oTestBox.sOs in self.kdatSimpleInstallUninstallMainLogReasonsPerOs: … … 1138 1159 self.uidSelf = self.oLogin.uid; 1139 1160 1161 # 1140 1162 # Do the stuff. 1163 # 1141 1164 if rcExit == 0: 1142 1165 rcExit = self.selfCheck(); … … 1146 1169 if rcExit == 0: 1147 1170 rcExit = rcExit2; 1171 # Redo the bad testbox management after failure reasons have been assigned (got timing issues). 1172 if rcExit == 0: 1173 rcExit = self.badTestBoxManagement(); 1148 1174 1149 1175 # Cleanup.
Note:
See TracChangeset
for help on using the changeset viewer.