VirtualBox

Changeset 84788 in vbox


Ignore:
Timestamp:
Jun 11, 2020 7:56:16 AM (4 years ago)
Author:
vboxsync
Message:

Validation Kit/testdriver: Added new task for getting TXS' version information.

Location:
trunk/src/VBox/ValidationKit/testdriver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/txsclient.py

    r84764 r84788  
    696696            rc = self.recvAckLogged("BYE");
    697697        self.oTransport.disconnect();
     698        return rc;
     699
     700    def taskVer(self):
     701        """Requests version information from TXS"""
     702        rc = self.sendMsg("VER");
     703        if rc is True:
     704            rc = False;
     705            cbMsg, sOpcode, abPayload = self.recvReply();
     706            if cbMsg is not None:
     707                sOpcode = sOpcode.strip();
     708                if sOpcode == "ACK VER":
     709                    sVer = getSZ(abPayload, 0);
     710                    if sVer is not None:
     711                        rc = sVer;
     712                else:
     713                    reporter.maybeErr(self.fErr, 'taskVer got a bad reply: %s' % (sOpcode,));
     714            else:
     715                reporter.maybeErr(self.fErr, 'taskVer got 3xNone from recvReply.');
    698716        return rc;
    699717
     
    13331351        return self.asyncToSync(self.asyncDisconnect, cMsTimeout, fIgnoreErrors);
    13341352
     1353    def asyncVer(self, cMsTimeout = 30000, fIgnoreErrors = False):
     1354        """
     1355        Initiates a task for getting the TXS version information.
     1356
     1357        Returns True on success, False on failure (logged).
     1358
     1359        The task returns the version string on success and False on failure.
     1360        """
     1361        return self.startTask(cMsTimeout, fIgnoreErrors, "ver", self.taskVer);
     1362
     1363    def syncVer(self, cMsTimeout = 30000, fIgnoreErrors = False):
     1364        """Synchronous version."""
     1365        return self.asyncToSync(self.asyncVer, cMsTimeout, fIgnoreErrors);
     1366
    13351367    def asyncUuid(self, cMsTimeout = 30000, fIgnoreErrors = False):
    13361368        """
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r84767 r84788  
    34863486                              (self.adjustTimeoutMs(cMsTimeout), fIgnoreErrors));
    34873487
     3488    def txsVer(self, oSession, oTxsSession, cMsTimeout = 30000, fIgnoreErrors = False):
     3489        return self.txsDoTask(oSession, oTxsSession, oTxsSession.asyncVer,
     3490                              (self.adjustTimeoutMs(cMsTimeout), fIgnoreErrors));
     3491
    34883492    def txsUuid(self, oSession, oTxsSession, cMsTimeout = 30000, fIgnoreErrors = False):
    34893493        return self.txsDoTask(oSession, oTxsSession, oTxsSession.asyncUuid,
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