VirtualBox

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

ValidationKit/tdStorageBenchmark1: Testcase fixes for Windows

Location:
trunk/src/VBox/ValidationKit/tests/storage
Files:
3 edited

Legend:

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

    r79592 r79602  
    284284            fRc = self.oTxsSession.syncRmTree(sDir, cMsTimeout);
    285285        else:
    286             fRc = self.execBinaryNoStdOut('rm', ('-rf', sDir));
    287 
    288         return fRc;
    289 
     286            try:
     287                shutil.rmtree(sDir, ignore_errors=True);
     288            except:
     289                fRc = False;
     290
     291        return fRc;
     292
  • 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;
  • trunk/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py

    r79592 r79602  
    395395    # Global storage configs for the testbox
    396396    kdStorageCfgs = {
     397        # Testbox configs
    397398        'testboxstor1.de.oracle.com': storagecfg.DiskCfg('solaris', storagecfg.g_ksDiskCfgRegExp, r'c[3-9]t\dd0\Z'),
    398         'testboxstor2.de.oracle.com': storagecfg.DiskCfg('win',     storagecfg.g_ksDiskCfgStatic, 'D:'),
     399        'testboxstor2.de.oracle.com': storagecfg.DiskCfg('win',     storagecfg.g_ksDiskCfgStatic, 'D:\\StorageTest'),
     400
     401        # Local test configs for the testcase developer
    399402        'adaris':                     storagecfg.DiskCfg('linux',   storagecfg.g_ksDiskCfgList,   [ '/dev/sda' ]),
    400403        'daedalus':                   storagecfg.DiskCfg('darwin',  storagecfg.g_ksDiskCfgStatic, \
    401                                                          '/Volumes/VirtualBox/Testsuite/StorageScratch')
     404                                                         '/Volumes/VirtualBox/Testsuite/StorageScratch'),
     405        'windows10':                  storagecfg.DiskCfg('win',  storagecfg.g_ksDiskCfgStatic, \
     406                                                         'L:\\Testsuite\\StorageTest'),
    402407    };
    403408
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