From 4b9ba3d8bc1705eda9b7dc277d7e084719c0731a Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Fri, 19 Jul 2019 13:48:51 +0530 Subject: [PATCH] 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 --- qa/tasks/cephfs/mount.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index e56010b4aa521..cd51632fa2429 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, -- 2.39.5