From: Rishabh Dave Date: Fri, 19 Jul 2019 08:18:51 +0000 (+0530) Subject: qa/cephfs: make run_shell() accept args as str too X-Git-Tag: v14.2.10~5^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F35391%2Fhead;p=ceph.git qa/cephfs: make run_shell() accept args as str too Signed-off-by: Rishabh Dave (cherry picked from commit a83ea849d7d2096762a125b8c6dbb8eb9988b2a9) Conflicts: qa/tasks/cephfs/mount.py - in nautilus, run_shell doesn't take a "stdin" argument --- diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index e56010b4aa52..cd51632fa242 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -158,6 +158,9 @@ class CephFSMount(object): return six.ensure_str(p.stdout.getvalue().strip()) def run_shell(self, args, wait=True, check_status=True, omit_sudo=True): + if isinstance(args, str): + args = args.split() + args = ["cd", self.mountpoint, run.Raw('&&'), "sudo"] + args return self.client_remote.run(args=args, stdout=StringIO(), stderr=StringIO(), wait=wait,