summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPavani Rajula <rpavani1998@gmail.com>2018-08-16 08:04:04 +0200
committerPavani Rajula <rpavani1998@gmail.com>2018-08-16 13:41:20 +0200
commitb0358447aace8d5364519510f14af2d9c011feb4 (patch)
tree6774ef87053989daf3c349f339f238697b147ed4 /src
parentMerge pull request #23600 from wjwithagen/wjw-fix-freebsd-manual (diff)
downloadceph-b0358447aace8d5364519510f14af2d9c011feb4.tar.xz
ceph-b0358447aace8d5364519510f14af2d9c011feb4.zip
Allow to unittest shell using transcript
Signed-off-by: Pavani Rajula <rpavani1998@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/tools/cephfs/cephfs-shell6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell
index 609bc7fb907..da2ac795776 100644
--- a/src/tools/cephfs/cephfs-shell
+++ b/src/tools/cephfs/cephfs-shell
@@ -957,10 +957,12 @@ if __name__ == '__main__':
if args.config:
config_file = args.config
if args.batch:
- args.commands = ['load ' + args.batch, 'quit']
+ args.commands = ['load ' + args.batch, ',quit']
+ if args.test:
+ args.commands.extend(['-t,'] + [arg+',' for arg in args.test])
sys.argv.clear()
sys.argv.append(exe)
- sys.argv.extend(' '.join(args.commands).split(','))
+ sys.argv.extend([i.strip() for i in ' '.join(args.commands).split(',')])
setup_cephfs(config_file)
c = CephFSShell()
c.cmdloop()