mirror of
https://github.com/ceph/ceph
synced 2024-12-18 17:37:38 +00:00
suite: make collection args (optionally) relative to a base dir
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
802fa51dae
commit
2dd889e4fd
@ -54,6 +54,11 @@ combination, and will override anything in the suite.
|
||||
help='name for this suite',
|
||||
required=True,
|
||||
)
|
||||
parser.add_argument(
|
||||
'--base',
|
||||
default=None,
|
||||
help='base directory for the collection(s)'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--collections',
|
||||
metavar='DIR',
|
||||
@ -114,13 +119,13 @@ combination, and will override anything in the suite.
|
||||
base_arg.extend(['--owner', args.owner])
|
||||
|
||||
for collection in args.collections:
|
||||
if not os.path.isdir(collection):
|
||||
print >>sys.stderr, 'Collection %s is not a directory' % collection
|
||||
p = os.path.join(args.base, collection)
|
||||
if not os.path.isdir(p):
|
||||
print >>sys.stderr, 'Collection %s is not a directory' % p
|
||||
sys.exit(1)
|
||||
|
||||
collections = [
|
||||
(collection,
|
||||
os.path.basename(safepath.munge(collection)))
|
||||
(os.path.join(args.base, collection), collection)
|
||||
for collection in args.collections
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user