From: Zack Cerza Date: Mon, 16 Sep 2013 23:33:21 +0000 (-0500) Subject: Revert "suite: do not calculate product on an empty list" X-Git-Tag: 1.1.0~1873 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e65d6e2a00f37b8486146ebd21fd7d7e8cdfdb3a;p=teuthology.git Revert "suite: do not calculate product on an empty list" This reverts commit dda7954090ccc9ffd8ecd961d6b530a0e6d24964. This commit was causing the number of jobs scheduled per suite to be multiplied by anywhere from 2 to 7 or more. --- diff --git a/teuthology/suite.py b/teuthology/suite.py index 894e62db2c..0fc079a495 100644 --- a/teuthology/suite.py +++ b/teuthology/suite.py @@ -250,13 +250,12 @@ def build_matrix(path): raw = build_matrix(os.path.join(path, fn)) sublists.append([(combine_path(fn, item[0]), item[1]) for item in raw]) out = [] - if sublists: - for sublist in itertools.product(*sublists): - name = '{' + ' '.join([item[0] for item in sublist]) + '}' - val = [] - for item in sublist: - val.extend(item[1]) - out.append((name, val)) + for sublist in itertools.product(*sublists): + name = '{' + ' '.join([item[0] for item in sublist]) + '}' + val = [] + for item in sublist: + val.extend(item[1]) + out.append((name, val)) return out else: # list items