Changeset 93032 in vbox for trunk/src/VBox/ValidationKit/testmanager
- Timestamp:
- Dec 20, 2021 6:38:09 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/batch/virtual_test_sheriff.py
r90595 r93032 708 708 atValues = dReasonForResultId.values(); 709 709 fSingleReason = True; 710 if len(dReasonForResultId) == 1 and dReasonForResultId.keys()[0]!= oCaseFile.oTestSet.idTestResult:711 self.dprint(u'Promoting single reason to whole set: %s' % ( atValues[0],));712 elif len(dReasonForResultId) > 1 and len(atValues) == atValues.count(atValues[0]):713 self.dprint(u'Merged %d reasons to a single one: %s' % (len(atValues), atValues[0]));710 if len(dReasonForResultId) == 1 and next(iter(dReasonForResultId.keys())) != oCaseFile.oTestSet.idTestResult: 711 self.dprint(u'Promoting single reason to whole set: %s' % (next(iter(atValues)),)); 712 elif len(dReasonForResultId) > 1 and len(atValues) == list(atValues).count(next(iter(atValues))): 713 self.dprint(u'Merged %d reasons to a single one: %s' % (len(atValues), next(iter(atValues)))); 714 714 else: 715 715 fSingleReason = False; 716 716 if fSingleReason: 717 dReasonForResultId = { oCaseFile.oTestSet.idTestResult: atValues[0], };717 dReasonForResultId = { oCaseFile.oTestSet.idTestResult: next(iter(atValues)), }; 718 718 if dCommentForResultId: 719 dCommentForResultId = { oCaseFile.oTestSet.idTestResult: dCommentForResultId.values()[0], };719 dCommentForResultId = { oCaseFile.oTestSet.idTestResult: next(iter(dCommentForResultId.values())), }; 720 720 elif oCaseFile.tReason is not None: 721 721 dReasonForResultId = { oCaseFile.oTestSet.idTestResult: oCaseFile.tReason, }; … … 725 725 726 726 self.vprint(u'Closing %s with following reason%s: %s' 727 % ( oCaseFile.sName, 's' if dReasonForResultId > 0else '', dReasonForResultId, ));727 % ( oCaseFile.sName, 's' if len(dReasonForResultId) > 1 else '', dReasonForResultId, )); 728 728 729 729 #
Note:
See TracChangeset
for help on using the changeset viewer.