From: Zack Cerza Date: Wed, 15 Jun 2016 19:15:39 +0000 (-0600) Subject: Fix regression in --subset X-Git-Tag: 1.1.0~600^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F879%2Fhead;p=teuthology.git Fix regression in --subset We were processing the --subset arg well after it was necessary :-/ http://tracker.ceph.com/issues/16335 Fixes: 16335 Signed-off-by: Zack Cerza --- diff --git a/teuthology/suite/__init__.py b/teuthology/suite/__init__.py index 273a56a4a..d350e83ab 100644 --- a/teuthology/suite/__init__.py +++ b/teuthology/suite/__init__.py @@ -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 diff --git a/teuthology/suite/build_matrix.py b/teuthology/suite/build_matrix.py index ce8587985..a2fe2ba38 100644 --- a/teuthology/suite/build_matrix.py +++ b/teuthology/suite/build_matrix.py @@ -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)