Looking at the dump, I see it can also happen that the dump contains several records for a pair platform/bbnum. I am not sure why it happens, I think it shouldn't, might be a bug in buildbot and/or configuration, or environmental problems. Anyway, due to the way we store output files, they can well override each other in this case, thus for several platform/bbnum record you will have only one file. I suppose that's what was hard to resolve, sorry about that.
You should consider skipped tests, at least for now. Your logic that they are skipped because they can't be run is generally correct; unfortunately, MTR first produces the *full* list of tests to run, and determines whether a test can be run or not on a later stage, when it starts running the tests. Your tool will receive the initial test list, and I'm not sure it's realistic to re-write MTR so that it takes into account limitations that cause skipping tests before creating the list.
Possibly it's better to skip a test run altogether if there is no input list for it; it would be definitely the best if there were 5K (or whatever slice you are currently using) of continuous test runs with input lists; if it so happens that there are lists for some branches but not others, you can skip the branch entirely.
The core module should take as parameters
- list of tests to choose from,
- size of the running set (%),
- branch/platform (if we use them in the end),
and produce a new list of tests of the size of the running set.
The wrapper module should
- read the list of tests from the outside world (for now, from a file),
- receive branch/platform as command-line options,
- have the running set size set as an easily changeable constant or as a configuration parameter,
and return the list of tests -- lets say for now, in the form of <test suite>.<test name>, blank-separated, e.g.
main.select innondb.create-index ...