def setUpClass(cls): """ Setup nfs-ganesha if not exists. """ cls.get_super_method(cls, 'setUpClass')() # Setup nfs-ganesha if not exists. ret = cls.setup_nfs_ganesha() if not ret: raise ExecutionError("Failed to setup nfs-ganesha cluster") g.log.info("nfs-ganesha cluster is healthy") # Cloning the cthon test repo cls.dir_name = "repo_dir" link = 'git://linux-nfs.org/~steved/cthon04.git' ret = git_clone_and_compile(cls.clients, link, cls.dir_name, compile_option=True) if not ret: raise ExecutionError("Failed to clone the cthon repo." "Check error logs to know which" "node it failed on.") else: g.log.info("Successfully cloned the" "test repo on provided nodes.")
def _run_git_clone(self, options): """Run git clone on the client""" repo = 'https://github.com/gluster/glusterfs.git' cloned_repo_dir = (self.mounts[0].mountpoint + '/' + repo.split('/')[-1].rstrip('.git')) if options: cloned_repo_dir = (self.mounts[0].mountpoint + '/' + "perf-" + repo.split('/')[-1].rstrip('.git')) ret = git_clone_and_compile(self.mounts[0].client_system, repo, cloned_repo_dir, False) self.assertTrue( ret, "Unable to clone {} repo on {}".format(repo, cloned_repo_dir)) g.log.info("Repo %s cloned successfully ", repo)
def setUpClass(cls): """ Setup nfs-ganesha if not exists. Upload IO scripts to clients """ cls.get_super_method(cls, 'setUpClass')() # Setup nfs-ganesha if not exists. ret = cls.setup_nfs_ganesha() if not ret: raise ExecutionError("Failed to setup nfs-ganesha cluster") g.log.info("nfs-ganesha cluster is healthy") # Upload IO scripts for running IO on mounts g.log.info( "Upload io scripts to clients %s for running IO on " "mounts", cls.clients) cls.script_upload_path = ("/usr/share/glustolibs/io/scripts/" "file_dir_ops.py") ret = upload_scripts(cls.clients, cls.script_upload_path) if not ret: raise ExecutionError("Failed to upload IO scripts to clients %s" % cls.clients) g.log.info("Successfully uploaded IO scripts to clients %s", cls.clients) # Cloning posix test suite cls.dir_name = "repo_dir" link = "https://github.com/ffilz/ntfs-3g-pjd-fstest.git" ret = git_clone_and_compile(cls.clients, link, cls.dir_name, compile_option=False) if not ret: raise ExecutionError("Failed to clone test repo") g.log.info("Successfully cloned test repo on client") cmd = "cd /root/repo_dir; sed 's/ext3/glusterfs/g' tests/conf; make" for client in cls.clients: ret, _, _ = g.run(client, cmd) if ret == 0: g.log.info("Test repo successfully compiled on" "client %s" % client) else: raise ExecutionError("Failed to compile test repo")