]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
suite/build_matrix: get rid of '.yaml' in descriptions 1482/head
authorKyr Shatskyy <kyrylo.shatskyy@suse.com>
Fri, 15 May 2020 20:48:47 +0000 (22:48 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Fri, 15 May 2020 22:14:14 +0000 (00:14 +0200)
Test descriptions have structured representation
fragments the test config is composed from.
It's worth noticing that no other files except yaml
are used for description composition.
Although having the .yaml extentions in the description
looks redundant and has no use in the code.

This change removes many '.yaml' sufixes from
descriptions which make it more compact and easy
to read.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
teuthology/suite/build_matrix.py
teuthology/suite/test/test_build_matrix.py

index 8efb2a8f94ea379fa1cac3e24c299903bb553827..2ae78a42be9c084909a343a6409551c5bf2061ed 100644 (file)
@@ -185,7 +185,7 @@ def generate_combinations(path, mat, generate_from, generate_to):
     for i in range(generate_from, generate_to):
         output = mat.index(i)
         ret.append((
-            matrix.generate_desc(combine_path, output),
+            matrix.generate_desc(combine_path, output).replace('.yaml', ''),
             matrix.generate_paths(path, output, combine_path)))
     return ret
 
index d0476c3461edd1d728a6ff55a3c96407fa488dc3..504903692683801d9eb372c961c72a01ab59db80 100644 (file)
@@ -637,9 +637,9 @@ class TestSubset(object):
                     sub_max_facets, max_fanout,
                     max_depth - 1, namegen, top=False)
                 if subtree is not None:
-                    tree[next(namegen)] = subtree
+                    tree['d' + next(namegen)] = subtree
                 else:
-                    tree[yamilify(next(namegen))] = None
+                    tree[yamilify('f' + next(namegen))] = None
             random.choice([
                 lambda: tree.update({'%': None}),
                 lambda: None])()
@@ -680,7 +680,12 @@ class TestSubset(object):
                     ret += ('\t'*tabs) + (k + ':').ljust(10) + "\n"
                     ret += pptree(v, tabs+1)
             return ret
-        for facet in flatten(tree):
+        def deyamlify(name):
+            if name.endswith('.yaml'):
+                return name[:-5]
+            else:
+                return name
+        for facet in (deyamlify(_) for _ in flatten(tree)):
             found = False
             for i in description_list:
                 if facet in i: