From 73a64f728eff08b243646ad609f0c147436a04bf Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 15 Jun 2016 13:15:39 -0600 Subject: [PATCH] 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 --- teuthology/suite/__init__.py | 9 +++------ teuthology/suite/build_matrix.py | 8 ++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/teuthology/suite/__init__.py b/teuthology/suite/__init__.py index 273a56a4..d350e83a 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 ce858798..a2fe2ba3 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) -- 2.47.3