Changeset 80244 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Aug 13, 2019 8:37:08 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py
r80226 r80244 78 78 def prepare(self, cMsTimeout = 30000): 79 79 """ Prepares the testcase """ 80 reporter.testStart('Fio'); 80 81 81 82 sTargetOs = self.dCfg.get('TargetOs', 'linux'); … … 118 119 def run(self, cMsTimeout = 30000): 119 120 """ Runs the testcase """ 120 _ = cMsTimeout121 121 fRc, sOutput, sError = self.oExecutor.execBinary('fio', (self.sCfgFileId,), cMsTimeout = cMsTimeout); 122 122 if fRc: … … 132 132 def cleanup(self): 133 133 """ Cleans up any leftovers from the testcase. """ 134 reporter.testDone(); 135 return True; 134 136 135 137 def reportResult(self): … … 178 180 def prepare(self, cMsTimeout = 30000): 179 181 """ Prepares the testcase """ 180 _ = cMsTimeout;182 reporter.testStart('IoZone'); 181 183 return True; # Nothing to do. 182 184 … … 196 198 '\nError:\n\n' + 197 199 sError); 198 199 _ = cMsTimeout;200 200 return fRc; 201 201 202 202 def cleanup(self): 203 203 """ Cleans up any leftovers from the testcase. """ 204 reporter.testDone(); 204 205 return True; 205 206 … … 332 333 def __init__(self, aasTestLvls, aasTestsBlacklist, fnIsCfgSupported = None): 333 334 self.aasTestsBlacklist = aasTestsBlacklist; 334 self.at 3TestLvls = [];335 self.at4TestLvls = []; 335 336 self.iTestLvl = 0; 336 337 self.fnIsCfgSupported = fnIsCfgSupported; 337 338 for asTestLvl in aasTestLvls: 338 339 if isinstance(asTestLvl, tuple): 339 asTestLvl, f nTestFmt = asTestLvl;340 self.at 3TestLvls.append((0, fnTestFmt, asTestLvl));340 asTestLvl, fSubTestStartAuto, fnTestFmt = asTestLvl; 341 self.at4TestLvls.append((0, fSubTestStartAuto, fnTestFmt, asTestLvl)); 341 342 else: 342 self.at 3TestLvls.append((0, None, asTestLvl));343 344 self.at 3TestLvls.reverse();343 self.at4TestLvls.append((0, True, None, asTestLvl)); 344 345 self.at4TestLvls.reverse(); 345 346 346 347 # Get the first non blacklisted test. … … 351 352 iLvl = 0; 352 353 for sCfg in asTestCfg: 353 reporter.testStart('%s' % (self.getTestIdString(sCfg, iLvl))); 354 sSubTest = self.getTestIdString(sCfg, iLvl); 355 if sSubTest is not None: 356 reporter.testStart('%s' % (sSubTest,)); 354 357 iLvl += 1; 355 358 356 359 def __del__(self): 357 360 # Make sure the tests are marked as done. 358 while self.iTestLvl < len(self.at 3TestLvls):361 while self.iTestLvl < len(self.at4TestLvls): 359 362 reporter.testDone(); 360 363 self.iTestLvl += 1; … … 367 370 # The order of the test levels is reversed so get the level starting 368 371 # from the end. 369 _, fnTestFmt, _ = self.at3TestLvls[len(self.at3TestLvls) - 1 - iLvl]; 372 _, fSubTestStartAuto, fnTestFmt, _ = self.at4TestLvls[len(self.at4TestLvls) - 1 - iLvl]; 373 if not fSubTestStartAuto: 374 return None; 370 375 if fnTestFmt is not None: 371 376 return fnTestFmt(oCfg); … … 398 403 array of strings or an empty config if there is no test left anymore. 399 404 """ 400 iTestCfg, f nTestFmt, asTestCfg = self.at3TestLvls[self.iTestLvl];405 iTestCfg, fSubTestStartAuto, fnTestFmt, asTestCfg = self.at4TestLvls[self.iTestLvl]; 401 406 iTestCfg += 1; 402 self.at 3TestLvls[self.iTestLvl] = (iTestCfg, fnTestFmt, asTestCfg);403 while iTestCfg == len(asTestCfg) and self.iTestLvl < len(self.at 3TestLvls):404 self.at 3TestLvls[self.iTestLvl] = (0, fnTestFmt, asTestCfg);407 self.at4TestLvls[self.iTestLvl] = (iTestCfg, fSubTestStartAuto, fnTestFmt, asTestCfg); 408 while iTestCfg == len(asTestCfg) and self.iTestLvl < len(self.at4TestLvls): 409 self.at4TestLvls[self.iTestLvl] = (0, fSubTestStartAuto, fnTestFmt, asTestCfg); 405 410 self.iTestLvl += 1; 406 if self.iTestLvl < len(self.at 3TestLvls):407 iTestCfg, f nTestFmt, asTestCfg = self.at3TestLvls[self.iTestLvl];411 if self.iTestLvl < len(self.at4TestLvls): 412 iTestCfg, fSubTestStartAuto, fnTestFmt, asTestCfg = self.at4TestLvls[self.iTestLvl]; 408 413 iTestCfg += 1; 409 self.at 3TestLvls[self.iTestLvl] = (iTestCfg, fnTestFmt, asTestCfg);414 self.at4TestLvls[self.iTestLvl] = (iTestCfg, fSubTestStartAuto, fnTestFmt, asTestCfg); 410 415 if iTestCfg < len(asTestCfg): 411 416 self.iTestLvl = 0; … … 422 427 asTestCfg = []; 423 428 424 if self.iTestLvl < len(self.at 3TestLvls):425 for t 3TestLvl in self.at3TestLvls:426 iTestCfg, _, asTestLvl = t3TestLvl;429 if self.iTestLvl < len(self.at4TestLvls): 430 for t4TestLvl in self.at4TestLvls: 431 iTestCfg, _, _, asTestLvl = t4TestLvl; 427 432 asTestCfg.append(asTestLvl[iTestCfg]); 428 433 … … 444 449 # Compare the current and next config and close the approriate test 445 450 # categories. 446 reporter.testDone(fSkippedLast);451 #reporter.testDone(fSkippedLast); 447 452 if asTestCfg: 448 453 idxSame = 0; … … 454 459 455 460 for i in range(idxSame, len(asTestCfg)): 456 reporter.testStart('%s' % (self.getTestIdString(asTestCfg[i], i))); 461 sSubTest = self.getTestIdString(asTestCfg[i], i); 462 if sSubTest is not None: 463 reporter.testStart('%s' % (sSubTest,)); 457 464 458 465 else: … … 541 548 kiCpuCount = 5; 542 549 kiVirtMode = 6; 543 ki IoTest= 7;544 ki TestSet= 8;550 kiTestSet = 7; 551 kiIoTest = 8; 545 552 546 553 def __init__(self): … … 1346 1353 aasTestCfgs.insert(self.kiVmName, self.asTestVMs); 1347 1354 aasTestCfgs.insert(self.kiStorageCtrl, self.asStorageCtrls); 1348 aasTestCfgs.insert(self.kiHostIoCache, (self.asHostIoCache, self.fnFormatHostIoCache));1355 aasTestCfgs.insert(self.kiHostIoCache, (self.asHostIoCache, True, self.fnFormatHostIoCache)); 1349 1356 aasTestCfgs.insert(self.kiDiskFmt, self.asDiskFormats); 1350 1357 aasTestCfgs.insert(self.kiDiskVar, self.asDiskVariants); 1351 aasTestCfgs.insert(self.kiCpuCount, (self.acCpus, self.fnFormatCpuString)); 1352 aasTestCfgs.insert(self.kiVirtMode, (self.asVirtModes, self.fnFormatVirtMode)); 1353 aasTestCfgs.insert(self.kiIoTest, self.asTests); 1358 aasTestCfgs.insert(self.kiCpuCount, (self.acCpus, True, self.fnFormatCpuString)); 1359 aasTestCfgs.insert(self.kiVirtMode, (self.asVirtModes, True, self.fnFormatVirtMode)); 1354 1360 aasTestCfgs.insert(self.kiTestSet, self.asTestSets); 1361 aasTestCfgs.insert(self.kiIoTest, (self.asTests, False, None)); 1355 1362 1356 1363 aasTestsBlacklist = []; … … 1404 1411 if sMountPoint is not None: 1405 1412 for sIoTest in self.asTests: 1406 reporter.testStart(sIoTest);1407 1413 for sTestSet in self.asTestSets: 1408 1414 reporter.testStart(sTestSet); … … 1410 1416 self.testBenchmark(utils.getHostOs(), sIoTest, sMountPoint, oExecutor, dTestSet); 1411 1417 reporter.testDone(); 1412 reporter.testDone();1413 1418 self.cleanupStorage(self.oStorCfg); 1414 1419 else:
Note:
See TracChangeset
for help on using the changeset viewer.