doc = """
usage: teuthology-suite [-h]
- teuthology-suite --name <name> --collections <dir>... [options]
- teuthology-suite -n <name> -c <dir>... [options] [<config_yaml>...]
+ teuthology-suite --name <name> --suite <suite> [options]
+ teuthology-suite -n <name> -s <suite> [options] [<config_yaml>...]
-Run a suite of ceph integration tests. A suite is a set of collections. A
-collection is a directory containing facets. A facet is a directory containing
-config snippets. Running a collection means running teuthology for every
-configuration combination generated by taking one config snippet from each
-facet. Any config files passed on the command line will be used for every
-combination, and will override anything in the suite.
+Run a suite of ceph integration tests. A suite is a directory containing
+facets. A facet is a directory containing config snippets. Running a suite
+means running teuthology for every configuration combination generated by
+taking one config snippet from each facet. Any config files passed on the
+command line will be used for every combination, and will override anything in
+the suite.
positional arguments:
<config_yaml> Optional extra job yaml to include
-v, --verbose Be more verbose
--dry-run Do a dry run; do not schedule anything
-n, --name <name> Name for this suite
- --base <base> Base directory for the collection(s)
- -c <dir>, --collections <dir>
- The collections to run
+ --base <base> Base directory for the suite
+ e.g. ~/src/ceph-qa-suite/suites
+ -s <suite>, --suite <suite>
+ The suite to run
--owner <owner> Job owner
--email <email> When tests finish or time out, send an email to this
address.
worker = args['--worker']
owner = args['--owner']
base = args['--base']
- collections = args['--collections']
+ suite = args['--suite']
email = args['--email']
timeout = args['--timeout']
base_yaml_paths = args['<config_yaml>']
if owner:
base_args.extend(['--owner', owner])
- collections = [
- (os.path.join(base, collection), collection)
- for collection in collections
- ]
+ suite_path = os.path.join(base, suite)
num_jobs = 0
- for collection, collection_name in sorted(collections):
- num_created = schedule_collection(name=collection_name,
- collection=collection,
- base_yamls=base_yaml_paths,
- base_args=base_args,
- arch=arch,
- machine_type=machine_type,
- limit=limit,
- offset=num_jobs,
- dry_run=dry_run,
- )
- num_jobs += num_created
+ schedule_suite(name=suite,
+ path=suite_path,
+ base_yamls=base_yaml_paths,
+ base_args=base_args,
+ arch=arch,
+ machine_type=machine_type,
+ limit=limit,
+ dry_run=dry_run,
+ )
if num_jobs:
arg = copy.deepcopy(base_args)
)
-def schedule_collection(name,
- collection,
- base_yamls,
- base_args,
- arch,
- machine_type,
- limit=0,
- offset=0,
- dry_run=True,
- ):
+def schedule_suite(name,
+ path,
+ base_yamls,
+ base_args,
+ arch,
+ machine_type,
+ limit=0,
+ dry_run=True,
+ ):
"""
- schedule one collection.
+ schedule one suite.
returns number of jobs scheduled
"""
count = 0
- log.debug('Collection %s in %s' % (name, collection))
+ log.debug('Suite %s in %s' % (name, path))
configs = [(combine_path(name, item[0]), item[1]) for item in
- build_matrix(collection)]
+ build_matrix(path)]
job_count = len(configs)
- log.info('Collection %s in %s generated %d jobs' % (
- name, collection, len(configs)))
+ log.info('Suite %s in %s generated %d jobs' % (
+ name, path, len(configs)))
for description, config in configs:
- if limit > 0 and (count + offset) >= limit:
+ if limit > 0 and count >= limit:
log.info(
'Stopped after {limit} jobs due to --limit={limit}'.format(
limit=limit))