diff options
author | Patrick Donnelly <pdonnell@redhat.com> | 2018-08-17 01:34:23 +0200 |
---|---|---|
committer | Patrick Donnelly <pdonnell@redhat.com> | 2018-08-17 01:34:23 +0200 |
commit | c25ef2a7ee5af3252c656477715bb2f3b1247eae (patch) | |
tree | 9137f4ce90d402c463def192922b2c66ff3885cc /src | |
parent | Merge PR #22555 into master (diff) | |
parent | Allow to unittest shell using transcript (diff) | |
download | ceph-c25ef2a7ee5af3252c656477715bb2f3b1247eae.tar.xz ceph-c25ef2a7ee5af3252c656477715bb2f3b1247eae.zip |
Merge PR #23468 into master
* refs/pull/23468/head:
Allow to unittest shell using transcript
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/cephfs/cephfs-shell | 6 |
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() |