]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Revert "suite: do not calculate product on an empty list"
authorZack Cerza <zack@cerza.org>
Mon, 16 Sep 2013 23:33:21 +0000 (18:33 -0500)
committerZack Cerza <zack@cerza.org>
Mon, 16 Sep 2013 23:33:21 +0000 (18:33 -0500)
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.

teuthology/suite.py

index 894e62db2c65feb9426b7d7d9bdf95d8cd27a0bd..0fc079a495f5df8149903cedcd69241e2f6643c1 100644 (file)
@@ -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