VirtualBox

Ignore:
Timestamp:
Jul 8, 2019 5:00:21 PM (5 years ago)
Author:
vboxsync
Message:

ValidationKit/tdStorageBenchmark1: Testcase fixes for Windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/storage/storagecfg.py

    r79593 r79602  
    461461        elif oDiskCfg.getTargetOs() == 'linux':
    462462            oStorOs = StorageConfigOsLinux(); # pylint: disable=redefined-variable-type
    463         elif not oDiskCfg.isCfgStaticDir(): # For unknown hosts we only a static testing directory we don't care about setting up.
     463        elif not oDiskCfg.isCfgStaticDir(): # For unknown hosts we only allow a static testing directory we don't care about setting up.
    464464            fRc = False;
    465465
     
    472472                for sDisk in oDiskCfg.getDisks():
    473473                    self.lstDisks.append(StorageDisk(sDisk));
     474            elif oDiskCfg.isCfgStaticDir():
     475                if not os.path.exists(oDiskCfg.getDisks()):
     476                        self.oExec.mkDir(oDiskCfg.getDisks(), 0o700);
    474477
    475478    def __del__(self):
    476479        self.cleanup();
     480        self.oDiskCfg = None;
    477481
    478482    def cleanup(self):
     
    492496        self.dVols.clear();
    493497        self.dPools.clear();
    494         self.oDiskCfg = None;
    495498        self.iPoolId  = 0;
    496499        self.iVolId   = 0;
     
    654657
    655658        fRc = True;
    656         for sEntry in os.listdir(self.oDiskCfg.getDisks()):
    657             fRc = fRc and self.oExec.rmTree(os.path.join(self.oDiskCfg.getDisks(), sEntry));
    658 
    659         return fRc;
     659        if os.path.exists(self.oDiskCfg.getDisks()):
     660            for sEntry in os.listdir(self.oDiskCfg.getDisks()):
     661                fRc = fRc and self.oExec.rmTree(os.path.join(self.oDiskCfg.getDisks(), sEntry));
     662
     663        return fRc;
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