예제 #1
0
class FilebenchTestCase(unittest.TestCase):
    _test_path = "/tmp"
    # Verify
    if os.name != "posix":
        raise PlatformError("fs_test just support for linux machine!")
    if not os.path.isdir(_test_path):
        raise NoSuchDir(_test_path)
    rc, output = utils.run_cmd('which filebench')
    if not output.strip("\n") or 'no filebench' in output:
        logger.warning("yum install filebench -y")
        raise NoSuchBinary("filebench not installed")

    def setUp(self):
        logger.info("Filebench Test Start ...")

    def tearDown(self):
        logger.info("Filebench Test Complete!")

    fb_parameterized = []
    fb_test = FileBench(_test_path)
    logger.info(fb_test.__doc__)
    for test in fb_test.tests_generator():
        p = param(test.name, test)
        fb_parameterized.append(p)

    @parameterized.expand(fb_parameterized, name_func=custom_name_func())
    def test_filebench(self, _, test):
        self.fb_test.run(test)
예제 #2
0
 def verify(self):
     if os.name != "posix":
         raise PlatformError("smbtorture just support for linux machine!")
     if not os.path.isdir(self.top_path):
         raise NoSuchDir(self.top_path)
     rc, output = utils.run_cmd('which smbtorture')
     if not output.strip("\n") or 'no smbtorture' in output:
         logger.warning("yum install smbtorture -y")
         raise NoSuchBinary("smbtorture not installed")
예제 #3
0
 def verify(self):
     if os.name != "posix":
         raise PlatformError("fs_test just support for linux machine!")
     if not os.path.isdir(self.top_path):
         raise NoSuchDir(self.top_path)
     rc, output = utils.run_cmd('which filebench')
     if not output.strip("\n") or 'no filebench' in output:
         logger.warning("yum install filebench -y")
         raise NoSuchBinary("filebench not installed")
예제 #4
0
 def verify(self):
     if os.name != "posix":
         raise PlatformError("Just support for linux machine!")
     if not os.path.isdir(self.top_path):
         raise NoSuchDir(self.top_path)
     try:
         utils.run_cmd("which attr", expected_rc=0)
     except Exception as e:
         logger.error(e)
         raise NoSuchBinary(
             "attr, try install it.(apt-get install -y attr)")
예제 #5
0
 def verify(self):
     if os.name != "posix":
         raise PlatformError("Just support for linux machine!")
     if not os.path.isdir(self.raw_device):
         raise NoSuchDir(self.raw_device)
예제 #6
0
 def verify(self):
     if os.name != "posix":
         raise PlatformError("fs_test just support for linux machine!")
     if not os.path.isdir(self.top_path):
         raise NoSuchDir(self.top_path)