VirtualBox

Changeset 98553 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Feb 14, 2023 12:50:45 AM (2 years ago)
Author:
vboxsync
Message:

vsheriff: Deal better with the 'in guest' unit test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/batch/virtual_test_sheriff.py

    r98103 r98553  
    940940        """
    941941
     942        # Determine if this is a host or guest run before we start.
     943        fRunsInGuest = '(guest)' in oCaseFile.oTestCase.sName or 'selected VMs' in oCaseFile.oTestCase.sName;
     944
    942945        #
    943946        # Process simple test case failures first, using their name as reason.
     
    963966
    964967            elif oFailedResult.oParent is not None:
    965                 # Get the 2nd level node because that's where we'll find the unit test name.
    966                 while oFailedResult.oParent.oParent is not None:
    967                     oFailedResult = oFailedResult.oParent;
    968 
     968                # Host:  Get the 2nd level node because that's where we'll find the unit test name.
     969                # Guest: Get the 6th level node.
     970                aoParents = [];
     971                oParent = oFailedResult.oParent;
     972                while oParent is not None:
     973                    aoParents.insert(0, oParent);
     974                    oParent = oParent.oParent;
     975                if not fRunsInGuest:
     976                    oFailedResult = aoParents[min(2, len(aoParents) - 1)];
     977                else:
     978                    oFailedResult = aoParents[min(5, len(aoParents) - 1)];
     979                   
    969980                # Only report a failure once.
    970981                if oFailedResult.idTestResult not in oCaseFile.dReasonForResultId:
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette