import yaml
from teuthology import misc as teuthology
+from teuthology import safepath
log = logging.getLogger(__name__)
parser = argparse.ArgumentParser(description="""
Run a suite of ceph integration tests.
-A suite is a directory containing a subdirectory collections/
-containing collections.
+A suite is a set of collections.
A collection is a directory containing facets.
A facet is a directory containing config snippets.
-Running the suite means running teuthology for every collection.
-
Running a collection means running teuthology for every configuration
combination generated by taking one config snippet from each facet.
help='be more verbose',
)
parser.add_argument(
- '--suite',
+ '--name',
+ help='name for this suite',
+ required=True,
+ )
+ parser.add_argument(
+ '--collections',
metavar='DIR',
- help='suite of tests to run',
+ nargs='+',
required=True,
+ help='the collections to run',
)
parser.add_argument(
'--owner',
help='job owner',
)
- parser.add_argument(
- '--name',
- help='name for this suite',
- required=True,
- )
parser.add_argument(
'--email',
help='address to email test failures to',
level=loglevel,
)
- collection_dir = os.path.join(args.suite,'collections')
- print collection_dir
- if os.path.exists(collection_dir) and os.path.isdir(collection_dir):
- collections = [
- (os.path.join(collection_dir, f), f)
- for f in sorted(os.listdir(collection_dir))
- if not f.startswith('.')
- and os.path.isdir(os.path.join(collection_dir, f))
- ]
- else:
- # degenerate case; 'suite' is actually a single collection
- collections = [(args.suite, 'none')]
-
base_arg = [
os.path.join(os.path.dirname(sys.argv[0]), 'teuthology-schedule'),
'--name', args.name,
if args.owner:
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
+ sys.exit(1)
+
+ collections = [
+ (collection,
+ os.path.basename(safepath.munge(collection)))
+ for collection in args.collections
+ ]
+
for collection, collection_name in sorted(collections):
log.info('Collection %s in %s' % (collection_name, collection))
facets = [
])
arg.extend(path for facet, name, path in configs)
arg.extend(args.config)
- print arg
subprocess.check_call(
args=arg,
)
if args.timeout:
arg.extend(['--timeout', args.timeout])
subprocess.check_call(
- args=arg
+ args=arg,
)
def ls():