]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Fix regression in --subset 879/head
authorZack Cerza <zack@redhat.com>
Wed, 15 Jun 2016 19:15:39 +0000 (13:15 -0600)
committerZack Cerza <zack@redhat.com>
Wed, 15 Jun 2016 19:36:02 +0000 (13:36 -0600)
We were processing the --subset arg well after it was necessary :-/
http://tracker.ceph.com/issues/16335
Fixes: 16335
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/suite/__init__.py
teuthology/suite/build_matrix.py

index 273a56a4a7f905b1e5574ccca184ddff0819e945..d350e83ab3d264aebfb82aa39918c9262fb8f061 100644 (file)
@@ -38,6 +38,9 @@ def process_args(args):
             value = value.replace('/', ':')
         elif key in ('limit', 'priority', 'num'):
             value = int(value)
+        elif key == 'subset' and value is not None:
+            # take input string '2/3' and turn into (2, 3)
+            value = tuple(map(int, value.split('/')))
         conf[key] = value
     return conf
 
@@ -59,12 +62,6 @@ def main(args):
         config.archive_upload = args['--archive-upload']
         log.info('Will upload archives to ' + args['--archive-upload'])
 
-    subset = None
-    if args['--subset']:
-        # take input string '2/3' and turn into (2, 3)
-        subset = tuple(map(int, args['--subset'].split('/')))
-        log.info('Passed subset=%s/%s' % (str(subset[0]), str(subset[1])))
-
     run = Run(fn)
     job_config = run.base_config
     name = run.name
index ce858798524b3996e572647402d420e697a6e050..a2fe2ba3812fbae791ac2c8e8a1834f1fa2c0a06 100644 (file)
@@ -1,7 +1,10 @@
+import logging
 import os
 
 from . import matrix
 
+log = logging.getLogger(__name__)
+
 
 def build_matrix(path, subset=None):
     """
@@ -39,6 +42,11 @@ def build_matrix(path, subset=None):
     :param path:        The path to search for yaml fragments
     :param subset:     (index, outof)
     """
+    if subset:
+        log.info(
+            'Subset=%s/%s' %
+            (str(subset[0]), str(subset[1]))
+        )
     mat, first, matlimit = _get_matrix(path, subset)
     return generate_combinations(path, mat, first, matlimit)