VirtualBox

Changeset 71543 in vbox


Ignore:
Timestamp:
Mar 28, 2018 3:34:21 PM (7 years ago)
Author:
vboxsync
Message:

bugref:8345. Next iteration. Use types dict and defaultdict(set). New functions: getStatesFiles, getSnapshotsFiles, getLogFiles. Function CheckLocation was implemented.

File:
1 edited

Legend:

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

    r71465 r71543  
    3535import time
    3636import shutil
     37from collections import defaultdict
    3738
    3839# Only the main script needs to modify the path.
     
    4950from tdMoveMedium1 import SubTstDrvMoveMedium1
    5051
     52class SubTstDrvMoveVM1Error(Exception):
     53    def __init__(self, desc):
     54        self.desc = desc
     55    def __str__(self):
     56        return repr(self.desc)
     57
    5158class SubTstDrvMoveVM1(base.SubTestDriverBase):
    5259    """
     
    5764        base.SubTestDriverBase.__init__(self, 'move-vm', oTstDrv)
    5865        self.asRsrcs = self.__getResourceSet()
    59 
    60         for oRes in self.asRsrcs:
    61             reporter.log('Resource is "%s"' % (oRes,))
     66        self.asImagesNames = []
     67        self.dsKeys = dict (StandardImage = 'SATA Controller',
     68                       ISOImage = 'IDE Controller',
     69                       FloppyImage = 'Floppy Controller',
     70                       SettingsFile = 'Settings File',
     71                       LogFile = 'Log File',
     72                       SavedStateFile = 'Saved State File',
     73                       SnapshotFile = 'Snapshot File')
    6274
    6375    def testIt(self):
     
    8496        oSession = self.oTstDrv.openSession(oVM)
    8597        aoDskFmts = self.oTstDrv.oVBoxMgr.getArray(self.oTstDrv.oVBox.systemProperties, 'mediumFormats')
    86         asFiles = []
     98
    8799        for oDskFmt in aoDskFmts:
    88100            aoDskFmtCaps = self.oTstDrv.oVBoxMgr.getArray(oDskFmt, 'capabilities')
     
    98110                fRc = False
    99111                break
    100             sFile = 'test-vm-move' + str(len(asFiles)) + sExt
     112            sFile = 'test-vm-move' + str(len(self.asImagesNames)) + sExt
    101113            sHddPath = os.path.join(self.oTstDrv.sScratchPath, sFile)
    102114            oHd = oSession.createBaseHd(sHddPath, sFmt=oDskFmt.id, cb=1024*1024)
     
    106118
    107119            # attach HDD, IDE controller exists by default, but we use SATA just in case
    108             sController='SATA Controller'
    109             fRc = fRc and oSession.attachHd(sHddPath, sController, iPort = len(asFiles),
     120            sController=self.dsKeys['StandardImage']
     121            fRc = fRc and oSession.attachHd(sHddPath, sController, iPort = len(self.asImagesNames),
    110122                                            fImmutable=False, fForceResource=False)
    111123            if fRc:
    112                 asFiles.append(sFile)
     124                self.asImagesNames.append(sFile)
    113125
    114126        fRc = fRc and oSession.saveSettings()
     
    147159    #checkLocation
    148160    #
    149     def checkLocation(self, sLocation, aoMediumAttachments, asFiles):
     161    #Prerequisites:
     162    #1. All standard images are attached to SATA controller
     163    #2. All ISO images are attached to IDE controller
     164    #3. All floppy images are attached to Floppy controller
     165    #4. The type defaultdict from collection is used here (some sort of multimap data structure)
     166    #5. The dsReferenceFiles parameter here is the structure defaultdict(set):
     167    #   [
     168    #   ('StandardImage': ['somedisk.vdi', 'somedisk.vmdk',...]),
     169    #    ('ISOImage': ['somedisk_1.iso','somedisk_2.iso',...]),
     170    #    ('FloppyImage': ['somedisk_1.img','somedisk_2.img',...]),
     171    #    ('SnapshotFile': ['snapshot file 1','snapshot file 2', ...]),
     172    #    ('SettingsFile', ['setting file',...]),
     173    #    ('SavedStateFile': ['state file 1','state file 2',...]),
     174    #    ('LogFile': ['log file 1','log file 2',...]),
     175    #    ]
     176    #
     177    def checkLocation(self, oMachine, dsReferenceFiles):
     178
    150179        fRc = True
    151         for oAttachment in aoMediumAttachments:
    152             sFilePath = os.path.join(sLocation, asFiles[oAttachment.port])
    153             sActualFilePath = oAttachment.medium.location
    154             if os.path.abspath(sFilePath) != os.path.abspath(sActualFilePath):
    155                 reporter.log('medium location expected to be "%s" but is "%s"' % (sFilePath, sActualFilePath))
    156                 fRc = False
    157             if not os.path.exists(sFilePath):
    158                 reporter.log('medium file does not exist at "%s"' % (sFilePath,))
    159                 fRc = False
     180        iLen = 0
     181
     182        for key, value in self.dsKeys.iteritems():
     183            aActuals = set()
     184            aReferences = set()
     185
     186            #Check standard images locations, ISO files locations, floppy images locations, snapshots files locations
     187            if key == 'StandardImage' or key == 'ISOImage' or key == 'FloppyImage':
     188                aReferences = dsReferenceFiles[key]
     189                if len (aReferences) > 0:
     190                    aoMediumAttachments = oMachine.getMediumAttachmentsOfController(value)
     191                    for oAttachment in aoMediumAttachments:
     192                        aActuals.add(oAttachment.medium.location)
     193
     194            elif key == 'SnapshotFile':
     195                aReferences = dsReferenceFiles[key]
     196                if len (aReferences) > 0:
     197                    aActuals = self.__getSnapshotsFiles(oMachine)
     198
     199            #Check setting file location
     200            elif key == 'SettingsFile':
     201                aReferences = dsReferenceFiles[key]
     202                if len (aReferences) > 0:
     203                    aActuals.add(oMachine.settingsFilePath)
     204
     205            #Check saved state files location
     206            elif key == 'SavedStateFile':
     207                aReferences = dsReferenceFiles[key]
     208                if len (aReferences) > 0:
     209                    aActuals = self.__getStatesFiles(oMachine)
     210
     211            #Check log files location
     212            elif key == 'LogFile':
     213                aReferences = dsReferenceFiles[key]
     214                if len (aReferences) > 0:
     215                    aActuals = self.__getLogFiles(oMachine)
     216
     217            if len(aActuals) > 0:
     218                reporter.log('Check %s' % (key))
     219                intersection = aReferences.intersection(aActuals)
     220                for eachItem in intersection:
     221                    reporter.log('Item location "%s" is correct' % (eachItem))
     222
     223                difference = aReferences.difference(aActuals)
     224                for eachItem in difference:
     225                    reporter.log('Item location "%s" isn\'t correct' % (eachItem))
     226
     227                if len (intersection) != len (aActuals):
     228                    reporter.log('Not all items in the right location. Check it.')
     229                    fRc = False
     230
    160231        return fRc
    161232
     
    168239
    169240        return False
     241
     242    def __getStatesFiles(self, oMachine, fPrint = False):
     243        asStateFilesList = set()
     244        sFolder = oMachine.snapshotFolder
     245        for file in os.listdir(sFolder):
     246            if file.endswith(".sav"):
     247                sFile = os.path.join(sFolder, file)
     248                asStateFilesList.add(sFile)
     249                if fPrint is True:
     250                    reporter.log("State file is %s" % (sFile))
     251        return asStateFilesList
     252
     253    def __getSnapshotsFiles(self, oMachine, fPrint = False):
     254        asSnapshotsFilesList = set()
     255        sFolder = oMachine.snapshotFolder
     256        for file in os.listdir(sFolder):
     257            if file.endswith(".sav") is False:
     258                sFile = os.path.join(sFolder, file)
     259                asSnapshotsFilesList.add(sFile)
     260                if fPrint is True:
     261                    reporter.log("Snapshot file is %s" % (sFile))
     262        return asSnapshotsFilesList
     263
     264    def __getLogFiles(self, oMachine, fPrint = False):
     265        asLogFilesList = set()
     266        sFolder = oMachine.logFolder
     267        for file in os.listdir(sFolder):
     268            if file.endswith(".log"):
     269                sFile = os.path.join(sFolder, file)
     270                asLogFilesList.add(sFile)
     271                if fPrint is True:
     272                    reporter.log("Log file is %s" % (sFile))
     273        return asLogFilesList
    170274
    171275    def __getResourceSet(self):
     
    197301            #create a new Session object for moving VM
    198302            oSession = self.oTstDrv.openSession(oMachine)
    199             fRc = self.moveVMToLocation(sNewLoc, oSession.o.machine) and fRc
     303
     304            #always clear before each scenario
     305            dsReferenceFiles = defaultdict(set)
     306
     307            asLogs = self.__getLogFiles(oMachine)
     308            for sFile in asLogs:
     309                sRes = sFile.rpartition(os.sep)
     310                dsReferenceFiles['LogFile'].add(sNewLoc + os.sep + oMachine.name + os.sep + 'Logs' + os.sep + sRes[2])
     311
     312            asStates = self.__getStatesFiles(oMachine)
     313            for sFile in asStates:
     314                sRes = sFile.rpartition(os.sep)
     315                dsReferenceFiles['SavedStateFile'].add(sNewLoc + os.sep + oMachine.name + os.sep + 'Snapshots' + os.sep + sRes[2])
     316
     317            fRc = self.moveVMToLocation(sNewLoc, oSession.o.machine)
     318
     319            if fRc is True:
     320                fRc = self.checkLocation(oSession.o.machine, dsReferenceFiles)
     321                if fRc is False:
     322                    reporter.testFailure('!!!!!!!!!!!!!!!!!! 4th scenario: Check locations failed... !!!!!!!!!!!!!!!!!!')
     323            else:
     324                reporter.testFailure('!!!!!!!!!!!!!!!!!! 4th scenario: Move VM failed... !!!!!!!!!!!!!!!!!!')
    200325
    201326            # cleaning up: get rid of saved state
    202             fRc = fRc and oSession.discardSavedState(True)
    203             if fRc is False:
    204                 reporter.log('Failed to discard the saved state of machine')
    205 
    206             fRc = oSession.close() and fRc
    207             if fRc is False:
    208                 reporter.log('Couldn\'t close machine session')
     327            fRes = oSession.discardSavedState(True)
     328            if fRes is False:
     329                reporter.log('4th scenario: Failed to discard the saved state of machine')
     330
     331            fRes = oSession.close()
     332            if fRes is False:
     333                reporter.log('4th scenario: Couldn\'t close machine session')
     334        else:
     335            reporter.testFailure('!!!!!!!!!!!!!!!!!! 4th scenario: Terminate machine by session failed... !!!!!!!!!!!!!!!!!!')
    209336
    210337        return fRc
     
    213340
    214341        fRc = True
     342        sISOImageName = 'tdMoveVM1.iso'
     343
     344        #always clear before each scenario
     345        dsReferenceFiles = defaultdict(set)
     346
    215347        #create a new Session object
    216348        oSession = self.oTstDrv.openSession(oMachine)
     
    230362        if fRc is True:
    231363            #set actual ISO location
    232             sISOLoc = sOldLoc + os.sep + 'tdMoveVM1.iso'
    233             sController='IDE Controller'
     364            sISOLoc = sOldLoc + os.sep + sISOImageName
     365            sController=self.dsKeys['ISOImage']
    234366            aoMediumAttachments = oMachine.getMediumAttachmentsOfController(sController)
    235367            iPort = len(aoMediumAttachments)
    236             reporter.log('sISOLoc "%s", sController "%s", iPort "%s"' % (sISOLoc,sController,iPort))
    237368            fRc = oSession.attachDvd(sISOLoc, sController, iPort, iDevice = 0)
     369            dsReferenceFiles['ISOImage'].add(os.path.join(os.path.join(sNewLoc, oMachine.name), sISOImageName))
    238370
    239371        if fRc is True:
    240             fRc = self.moveVMToLocation(sNewLoc, oSession.o.machine) and fRc
     372            fRc = self.moveVMToLocation(sNewLoc, oSession.o.machine)
     373            if fRc is True:
     374                fRc = self.checkLocation(oSession.o.machine, dsReferenceFiles)
     375                if fRc is False:
     376                    reporter.testFailure('!!!!!!!!!!!!!!!!!! 5th scenario: Check locations failed... !!!!!!!!!!!!!!!!!!')
     377            else:
     378                reporter.testFailure('!!!!!!!!!!!!!!!!!! 5th scenario: Move VM failed... !!!!!!!!!!!!!!!!!!')
     379        else:
     380            reporter.testFailure('!!!!!!!!!!!!!!!!!! 5th scenario: Attach ISO image failed... !!!!!!!!!!!!!!!!!!')
    241381
    242382        #detach ISO image
    243         fRc = oSession.detachHd(sController, iPort, 0)
    244 
    245         fRc = fRc and oSession.saveSettings()
    246         if fRc is False:
    247             reporter.log('Couldn\'t save machine settings after 5th scenario')
    248 
    249         fRc = oSession.close() and fRc
    250         if fRc is False:
    251             reporter.log('Couldn\'t close machine session')
     383        fRes = oSession.detachHd(sController, iPort, 0)
     384        if fRes is False:
     385            reporter.log('5th scenario: Couldn\'t detach image from the controller %s port %s device %s' % (sController, iPort, 0))
     386
     387        fRes = oSession.saveSettings()
     388        if fRes is False:
     389            reporter.log('5th scenario: Couldn\'t save machine settings')
     390
     391        fRes = oSession.close()
     392        if fRes is False:
     393            reporter.log('5th scenario: Couldn\'t close machine session')
    252394
    253395        return fRc
     
    256398
    257399        fRc = True
     400
     401        #always clear before each scenario
     402        dsReferenceFiles = defaultdict(set)
     403
    258404        #create a new Session object
    259405        oSession = self.oTstDrv.openSession(oMachine)
     
    272418        if fRc is True:
    273419            #set actual floppy location
    274             sFloppyLoc = sOldLoc + os.sep + 'tdMoveVM1.img'
    275             sController='Floppy Controller'
    276             reporter.log('sFloppyLoc "%s", sController "%s"' % (sFloppyLoc,sController))
     420            sFloppyImageName = 'tdMoveVM1.img'
     421            sFloppyLoc = sOldLoc + os.sep + sFloppyImageName
     422            sController=self.dsKeys['FloppyImage']
    277423            fRc = fRc and oSession.attachFloppy(sFloppyLoc, sController, 0, 0)
     424            dsReferenceFiles['FloppyImage'].add(os.path.join(os.path.join(sNewLoc, oMachine.name), sFloppyImageName))
    278425
    279426        if fRc is True:
    280             fRc = self.moveVMToLocation(sNewLoc, oSession.o.machine) and fRc
     427            fRc = self.moveVMToLocation(sNewLoc, oSession.o.machine)
     428            if fRc is True:
     429                fRc = self.checkLocation(oSession.o.machine, dsReferenceFiles)
     430                if fRc is False:
     431                    reporter.testFailure('!!!!!!!!!!!!!!!!!! 5th scenario: Check locations failed... !!!!!!!!!!!!!!!!!!')
     432            else:
     433                reporter.testFailure('!!!!!!!!!!!!!!!!!! 5th scenario: Move VM failed... !!!!!!!!!!!!!!!!!!')
     434        else:
     435            reporter.testFailure('!!!!!!!!!!!!!!!!!! 5th scenario: Attach floppy image failed... !!!!!!!!!!!!!!!!!!')
    281436
    282437        #detach floppy image
    283         fRc = oSession.detachHd(sController, 0, 0)
    284 
    285         fRc = fRc and oSession.saveSettings()
    286         if fRc is False:
    287             reporter.log('Couldn\'t save machine settings after 6th scenario')
    288 
    289         fRc = oSession.close() and fRc
    290         if fRc is False:
    291             reporter.log('Couldn\'t close machine session')
    292 
     438        fRes = oSession.detachHd(sController, 0, 0)
     439        if fRes is False:
     440            reporter.log('6th scenario: Couldn\'t detach image from the controller %s port %s device %s' % (sController, 0, 0))
     441
     442        fRes = oSession.saveSettings()
     443        if fRes is False:
     444            reporter.testFailure('6th scenario: Couldn\'t save machine settings')
     445
     446        fRes = oSession.close()
     447        if fRes is False:
     448            reporter.log('6th scenario: Couldn\'t close machine session')
    293449        return fRc
    294450
     
    305461            return False
    306462
    307         isSupported = self.checkAPIVersion()
    308 
    309         if isSupported is False:
     463        fSupported = self.checkAPIVersion()
     464
     465        if fSupported is False:
    310466            reporter.log('API version is below "%s". Just skip this test.' % (self.oTstDrv.fpApiVer))
    311467            return reporter.testDone()[1] == 0
     
    344500            os.mkdir(sBaseLoc, 0o775)
    345501
    346             sController='SATA Controller'
     502            sController=self.dsKeys['StandardImage']
    347503            aoMediumAttachments = oMachine.getMediumAttachmentsOfController(sController)
    348504
     
    353509
    354510            sNewLoc = sBaseLoc + os.sep
     511
     512            dsReferenceFiles = defaultdict(set)
     513
    355514############# 1 case. ##########################################################################################
    356515            #   All disks attached to VM are located outside the VM's folder.
    357516            #   There are no any snapshots and logs.
    358517            #   In this case only VM setting file should be moved (.vbox file)
    359             fRc = self.moveVMToLocation(sNewLoc, oSession.o.machine) and fRc
    360 
    361             fRc = fRc and oSession.saveSettings()
     518            for s in self.asImagesNames:
     519                reporter.log('"%s"' % (s,))
     520                dsReferenceFiles['StandardImage'].add(os.path.join(sOrigLoc, s))
     521
     522            sSettingFile = os.path.join(sNewLoc, os.path.join(oMachine.name, oMachine.name + '.vbox'))
     523            dsReferenceFiles['SettingsFile'].add(sSettingFile)
     524
     525            fRc = self.moveVMToLocation(sNewLoc, oSession.o.machine)
     526
     527            if fRc is True:
     528                fRc = self.checkLocation(oSession.o.machine, dsReferenceFiles)
     529                if fRc is False:
     530                    reporter.testFailure('!!!!!!!!!!!!!!!!!! 1st scenario: Check locations failed... !!!!!!!!!!!!!!!!!!')
     531                    return reporter.testDone()[1] == 0
     532            else:
     533                reporter.testFailure('!!!!!!!!!!!!!!!!!! 1st scenario: Move VM failed... !!!!!!!!!!!!!!!!!!')
     534                return reporter.testDone()[1] == 0
     535
     536            fRc = oSession.saveSettings()
    362537            if fRc is False:
    363                 reporter.log('Couldn\'t save machine settings after 1t scenario')
     538                reporter.testFailure('1st scenario: Couldn\'t save machine settings')
    364539
    365540############# 2 case. ##########################################################################################
    366541            #   All disks attached to VM are located inside the VM's folder.
    367542            #   There are no any snapshots and logs.
    368             sOldLoc = sNewLoc + os.sep + oMachine.name + os.sep
     543            sOldLoc = sNewLoc + oMachine.name + os.sep
    369544            sNewLoc = os.path.join(sOrigLoc, 'moveFolder_2d_scenario')
    370545            os.mkdir(sNewLoc, 0o775)
     546            sController = self.dsKeys['StandardImage']
    371547            aoMediumAttachments = oMachine.getMediumAttachmentsOfController(sController)
    372548            oSubTstDrvMoveMedium1Instance = SubTstDrvMoveMedium1(self.oTstDrv)
     
    375551            del oSubTstDrvMoveMedium1Instance
    376552
    377             fRc = self.moveVMToLocation(sNewLoc, oSession.o.machine) and fRc
    378 
    379             fRc = fRc and oSession.saveSettings()
     553            #always clear before each scenario
     554            dsReferenceFiles.clear()
     555
     556            for s in self.asImagesNames:
     557                reporter.log('"%s"' % (s,))
     558                dsReferenceFiles['StandardImage'].add(sNewLoc + os.sep + oMachine.name + os.sep + s)
     559
     560            sSettingFile = os.path.join(sNewLoc, os.path.join(oMachine.name, oMachine.name + '.vbox'))
     561            dsReferenceFiles['SettingsFile'].add(sSettingFile)
     562
     563            fRc = self.moveVMToLocation(sNewLoc, oSession.o.machine)
     564
     565            if fRc is True:
     566                fRc = self.checkLocation(oSession.o.machine, dsReferenceFiles)
     567                if fRc is False:
     568                    reporter.testFailure('!!!!!!!!!!!!!!!!!! 2nd scenario: Check locations failed... !!!!!!!!!!!!!!!!!!')
     569                    return reporter.testDone()[1] == 0
     570            else:
     571                reporter.testFailure('!!!!!!!!!!!!!!!!!! 2nd scenario: Move VM failed... !!!!!!!!!!!!!!!!!!')
     572                return reporter.testDone()[1] == 0
     573
     574            fRc = oSession.saveSettings()
    380575            if fRc is False:
    381                 reporter.log('Couldn\'t save machine settings after 2nd scenario')
     576                reporter.testFailure('2nd scenario: Couldn\'t save machine settings')
    382577
    383578############# 3 case. ##########################################################################################
    384579            #   There are snapshots.
    385             sOldLoc = sNewLoc + os.sep + oMachine.name + os.sep
     580            sOldLoc = sNewLoc + oMachine.name + os.sep
    386581            sNewLoc = os.path.join(sOrigLoc, 'moveFolder_3d_scenario')
    387582            os.mkdir(sNewLoc, 0o775)
    388583
    389             cSnap = 2
     584            #At moment, it's used only one snapshot due to the difficulty to get
     585            #all attachments of the machine (i.e. not only attached at moment)
     586            cSnap = 1
     587
    390588            for counter in range(1,cSnap+1):
    391589                strSnapshot = 'Snapshot' + str(counter)
    392590                fRc = fRc and oSession.takeSnapshot(strSnapshot)
    393591                if fRc is False:
    394                     reporter.error('Error: Can\'t take snapshot "%s".' % (strSnapshot,))
    395                     reporter.testFailure('Error: Can\'t take snapshot "%s".' % (strSnapshot,))
    396 
     592                    reporter.testFailure('3rd scenario: Can\'t take snapshot "%s"' % (strSnapshot,))
     593                    return reporter.testDone()[1] == 0
     594
     595            #always clear before each scenario
     596            dsReferenceFiles.clear()
     597
     598            sController = self.dsKeys['StandardImage']
    397599            aoMediumAttachments = oMachine.getMediumAttachmentsOfController(sController)
    398600            if fRc is True:
    399                 fRc = self.moveVMToLocation(sNewLoc, oSession.o.machine) and fRc
    400 
    401             fRc = fRc and oSession.saveSettings()
     601                for oAttachment in aoMediumAttachments:
     602                    sRes = oAttachment.medium.location.rpartition(os.sep)
     603                    dsReferenceFiles['SnapshotFile'].add(sNewLoc + os.sep + oMachine.name + os.sep + 'Snapshots' + os.sep + sRes[2])
     604
     605                sSettingFile = os.path.join(sNewLoc, os.path.join(oMachine.name, oMachine.name + '.vbox'))
     606                dsReferenceFiles['SettingsFile'].add(sSettingFile)
     607
     608                fRc = self.moveVMToLocation(sNewLoc, oSession.o.machine)
     609
     610            if fRc is True:
     611                fRc = self.checkLocation(oSession.o.machine, dsReferenceFiles)
     612                if fRc is False:
     613                    reporter.testFailure('!!!!!!!!!!!!!!!!!! 3rd scenario: Check locations failed... !!!!!!!!!!!!!!!!!!')
     614                    return reporter.testDone()[1] == 0
     615            else:
     616                reporter.testFailure('!!!!!!!!!!!!!!!!!! 3rd scenario: Move VM failed... !!!!!!!!!!!!!!!!!!')
     617                return reporter.testDone()[1] == 0
     618
     619            fRc = oSession.saveSettings()
    402620            if fRc is False:
    403                 reporter.log('Couldn\'t save machine settings after 3d scenario')
     621                reporter.testFailure('3d scenario: Couldn\'t save machine settings')
    404622
    405623############# 4 case. ##########################################################################################
     
    409627            #   And next move VM
    410628
    411             sOldLoc = sNewLoc + os.sep + oMachine.name + os.sep
     629            sOldLoc = sNewLoc + oMachine.name + os.sep
    412630            sNewLoc = os.path.join(sOrigLoc, 'moveFolder_4th_scenario')
    413631            os.mkdir(sNewLoc, 0o775)
     
    420638            del oSession
    421639
    422             self.__testScenario_4(oMachine, sNewLoc)
     640            fRc = self.__testScenario_4(oMachine, sNewLoc)
     641            if fRc is False:
     642                return reporter.testDone()[1] == 0
    423643
    424644############## 5 case. ##########################################################################################
     
    429649            sNewLoc = os.path.join(sOrigLoc, 'moveFolder_5th_scenario')
    430650            os.mkdir(sNewLoc, 0o775)
    431             self.__testScenario_5(oMachine, sNewLoc, sOldLoc)
     651            fRc = self.__testScenario_5(oMachine, sNewLoc, sOldLoc)
     652            if fRc is False:
     653                return reporter.testDone()[1] == 0
    432654
    433655############# 6 case. ##########################################################################################
     
    438660            sNewLoc = os.path.join(sOrigLoc, 'moveFolder_6th_scenario')
    439661            os.mkdir(sNewLoc, 0o775)
    440             self.__testScenario_6(oMachine, sNewLoc, sOldLoc)
     662            fRc = self.__testScenario_6(oMachine, sNewLoc, sOldLoc)
     663            if fRc is False:
     664                return reporter.testDone()[1] == 0
    441665
    442666############# 7 case. ##########################################################################################
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