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)
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")
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")
def setUp(self): self.phase_list.append([self.id().split('.')[-1], "Start", '', self.shortDescription()]) self.start_time = datetime.now() self.print_phase() fs_path = self.args[0].test_path if not os.path.isdir(fs_path): raise NoSuchDir(fs_path) self.test_path = os.path.join(fs_path, "sanity_{0}_{1}".format(self.str_time, self.tc_loop[self.id()])) utils.mkdir_path(self.test_path)
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)")
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)
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)
def verify(self): if not os.path.isdir(self.top_path): raise NoSuchDir(self.top_path)