Changeset 84175 in vbox for trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
- Timestamp:
- May 6, 2020 7:53:54 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
r84161 r84175 1599 1599 return fRc; 1600 1600 1601 def waitForGuestFacility(self, oSession, eFacilityType, sDesc, 1602 eFacilityStatus, cMsTimeout = 30 * 1000): 1603 """ 1604 Waits for a guest facility to enter a certain status. 1605 By default the "Active" status is being used. 1606 """ 1607 1608 reporter.log('Waiting for Guest Additions facility "%s" to change to status %s (%dms timeout)...' 1609 % (sDesc, str(eFacilityStatus), cMsTimeout)); 1610 1611 fRc = False; 1612 1613 eStatusOld = vboxcon.AdditionsFacilityStatus_Unknown; 1614 tsStart = base.timestampMilli(); 1615 while base.timestampMilli() - tsStart < cMsTimeout: 1616 try: 1617 eStatus, _ = oSession.o.console.guest.getFacilityStatus(eFacilityType); 1618 except: 1619 reporter.errorXcpt('Getting facility status failed'); 1620 break; 1621 if eStatus != eStatusOld: 1622 reporter.log('Status is now %s' % (str(eStatus))); 1623 eStatusOld = eStatus; 1624 if eStatus == eFacilityStatus: 1625 fRc = True; 1626 break; 1627 self.oTstDrv.sleep(5); # Do some busy waiting. 1628 1629 if not fRc: 1630 reporter.testFailure('Waiting for Guest Additions facility "%s" timed out' % (sDesc)); 1631 else: 1632 reporter.testFailure('Guest Additions facility "%s" reached requested status %s after %dms' 1633 % (sDesc, str(eFacilityStatus), base.timestampMilli() - tsStart)); 1634 1635 return fRc; 1636 1601 1637 # 1602 1638 # Guest test files. … … 1609 1645 """ 1610 1646 _ = oSession; 1647 1648 # 1649 # Wait for VBoxService to come up. 1650 # 1651 fRc = self.waitForGuestFacility(oSession, vboxcon.AdditionsFacilityType_VBoxService, "VBoxService", 1652 vboxcon.AdditionsFacilityStatus_Active); 1653 if not fRc: 1654 return (False, oTxsSession); 1611 1655 1612 1656 #
Note:
See TracChangeset
for help on using the changeset viewer.