]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Only allow scheduling one suite per call.
authorZack Cerza <zack@cerza.org>
Thu, 12 Jun 2014 16:25:30 +0000 (11:25 -0500)
committerZack Cerza <zack@cerza.org>
Wed, 25 Jun 2014 18:54:22 +0000 (12:54 -0600)
Also remove all traces of the extra and confusing term 'collection'

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
schedule_suite.sh
scripts/suite.py
teuthology/suite.py

index 94955c208043f06abeb68cd0efbe190178f84c54..0c0581be50b78f7823caa6a38fdd90c120b0c1fc 100755 (executable)
@@ -205,7 +205,7 @@ echo "name $name"
 
 ./virtualenv/bin/teuthology-suite -v $fn \
     --base ~/src/ceph-qa-suite/suites \
-    --collections $suite \
+    --suite $suite \
     --email $email \
     --timeout 36000 \
     $limitline \
index b8a9cb501102186981c4c44c6228e6d79bc1c42a..cbbd9fd643d2ec3a17b03adae525cf27330a1bd3 100644 (file)
@@ -4,15 +4,15 @@ import teuthology.suite
 
 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
@@ -22,9 +22,10 @@ optional arguments:
   -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.
index 399f4661c6346ece4a3d35b37e70c77bcd3d33df..49a219791c28fc4536dc22920986584ebb4fc853 100644 (file)
@@ -26,7 +26,7 @@ def main(args):
     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>']
@@ -50,24 +50,18 @@ def main(args):
     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)
@@ -84,30 +78,29 @@ def main(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))