Esempio n. 1
0
 def copy(self,
          destination,
          force: bool = False,
          recursive: bool = False,
          dereference: bool = False):
     fs_utils.copy(str(self), destination, force, recursive, dereference)
     if fs_utils.check_if_directory_exists(destination):
         path = f"{destination}{'/' if destination[-1] != '/' else ''}{self.name}"
     else:
         path = destination
     output = fs_utils.ls_item(f"{path}")
     return fs_utils.parse_ls_output(output)[0]
Esempio n. 2
0
    def post_setup(self):
        print("VDBench plugin post setup")
        if not self.reinstall and fs_utils.check_if_directory_exists(self.working_dir):
            return

        if fs_utils.check_if_directory_exists(self.working_dir):
            fs_utils.remove(self.working_dir, True, True)

        fs_utils.create_directory(self.working_dir)
        TestRun.LOGGER.info("Copying vdbench to working dir.")
        fs_utils.copy(os.path.join(self.source_dir, "*"), self.working_dir,
                      True, True)
        pass