]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
suite: add --subset option to allow us to schedule subsets of a suite
authorSamuel Just <sjust@redhat.com>
Fri, 27 Mar 2015 17:20:28 +0000 (10:20 -0700)
committerSamuel Just <sjust@redhat.com>
Thu, 7 May 2015 19:56:07 +0000 (12:56 -0700)
commit05e6f146a1216f46cb34e0c59699576add192b26
treee409af00a8fb45eae414a0923fef40a6d9133ca1
parent4b15e04cf8f419c5c1650719caa5d8a90d9f77dc
suite: add --subset option to allow us to schedule subsets of a suite

First, the old logic tended to do the following:

[0,1,2,3] x [a,b,c,d] -> [(0, a), (0, b), (0, c), ...]

which is a bummer since if we only schedule the first 1/4,
we only get combinations with 0.

Instead, we want:

[0,1,2,3] x [a,b,c,d] -> [(0, a), (1, b), (2, c), ...]

Second, the old logic tended to do the following:

[0,1,2,3] + [a,b,c,d] -> [0,1,2,3,a,b,c,d]

Which is a bummer since we need to all the way through the first
set before we get examples from the second.

Instead, we want:

[0,1,2,3] + [a,b,c,d] -> [0,a,1,b,2,c,3,d]

Lastly, if we have:

[0,1,2] + ([0,1,2],[a,b,c])

and want to schedule 1/3 of the suite, we don't want to
just schedule 0, we probably want to schedule all of
[0,1,2] and 1/3 of the second combo.  Thus, we want to
detect such cases and multiply out [0,1,2] into
[0,1,2,0,1,2,0,1,2].

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 9a57759ec3df7a8b9490920538214ac189418c49)
scripts/suite.py
teuthology/matrix.py [new file with mode: 0644]
teuthology/suite.py
teuthology/test/test_matrix.py [new file with mode: 0644]