VirtualBox

Ignore:
Timestamp:
Apr 6, 2018 10:07:33 PM (7 years ago)
Author:
vboxsync
Message:

bugref:8345. Several small improvements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/api/tdMoveVM1.py

    r71682 r71729  
    218218                    reporter.log('Item location "%s" isn\'t correct' % (eachItem))
    219219
     220                reporter.log('####### Reference locations: #######')
     221                for eachItem in aReferences:
     222                    reporter.log(' "%s"' % (eachItem))
     223
    220224                if len (intersection) != len (aActuals):
    221225                    reporter.log('Not all items in the right location. Check it.')
     
    270274        if self.oTstDrv.asRsrcs is None:
    271275            self.oTstDrv.asRsrcs = []
    272             self.oTstDrv.asRsrcs.append('5.3/isos/tdMoveVM.iso')
    273             self.oTstDrv.asRsrcs.append('5.3/floppy/tdMoveVM.img')
     276            self.oTstDrv.asRsrcs.append('5.3' + os.sep + 'isos' + os.sep + 'tdMoveVM1.iso')
     277            self.oTstDrv.asRsrcs.append('5.3' + os.sep + 'floppy' + os.sep + 'tdMoveVM1.img')
    274278
    275279        return self.oTstDrv.asRsrcs
     
    369373        #call Session::saveState(), already closes session unless it failed
    370374        fRc = oSession.saveState()
    371         self.oTstDrv.terminateVmBySession(oSession)
    372 
    373         if fRc:
     375        if fRc is True:
     376            reporter.log("Machine is in saved state")
     377
     378        fRc = self.oTstDrv.terminateVmBySession(oSession)
     379
     380        if fRc is True or False:
    374381            #create a new Session object for moving VM
    375382            oSession = self.oTstDrv.openSession(oMachine)
     
    423430        oSession = self.oTstDrv.openSession(oMachine)
    424431
    425         sISOLoc = '5.3/isos/tdMoveVM1.iso'
     432        sISOLoc = self.asRsrcs[0]#'5.3/isos/tdMoveVM1.iso'
    426433        reporter.log("sHost is '%s', sResourcePath is '%s'" % (self.oTstDrv.sHost, self.oTstDrv.sResourcePath))
    427434        sISOLoc = self.oTstDrv.getFullResourceName(sISOLoc)
     435        reporter.log("sISOLoc is '%s'" % (sISOLoc,))
    428436
    429437        if not os.path.exists(sISOLoc):
     
    438446            #set actual ISO location
    439447            sISOLoc = sOldLoc + os.sep + sISOImageName
     448            reporter.log("sISOLoc is '%s'" % (sISOLoc,))
     449            if not os.path.exists(sISOLoc):
     450                reporter.log('ISO file does not exist at "%s"' % (sISOLoc,))
     451                fRc = False
     452
    440453            sController=self.dsKeys['ISOImage']
    441454            aoMediumAttachments = oMachine.getMediumAttachmentsOfController(sController)
     
    483496        oSession = self.oTstDrv.openSession(oMachine)
    484497
    485         sFloppyLoc = '5.3/floppy/tdMoveVM1.img'
     498        sFloppyLoc = self.asRsrcs[1]#'5.3/floppy/tdMoveVM1.img'
    486499        sFloppyLoc = self.oTstDrv.getFullResourceName(sFloppyLoc)
    487500
     
    507520                fRc = self.checkLocation(oSession.o.machine, dsReferenceFiles)
    508521                if fRc is False:
    509                     reporter.testFailure('!!!!!!!!!!!!!!!!!! 5th scenario: Check locations failed... !!!!!!!!!!!!!!!!!!')
     522                    reporter.testFailure('!!!!!!!!!!!!!!!!!! 6th scenario: Check locations failed... !!!!!!!!!!!!!!!!!!')
    510523            else:
    511                 reporter.testFailure('!!!!!!!!!!!!!!!!!! 5th scenario: Move VM failed... !!!!!!!!!!!!!!!!!!')
     524                reporter.testFailure('!!!!!!!!!!!!!!!!!! 6th scenario: Move VM failed... !!!!!!!!!!!!!!!!!!')
    512525        else:
    513             reporter.testFailure('!!!!!!!!!!!!!!!!!! 5th scenario: Attach floppy image failed... !!!!!!!!!!!!!!!!!!')
     526            reporter.testFailure('!!!!!!!!!!!!!!!!!! 6th scenario: Attach floppy image failed... !!!!!!!!!!!!!!!!!!')
    514527
    515528        #detach floppy image
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