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)