Add support for sharding the ART MTS definition to `regen-test-files`.

Introduce the notion of "MTS test shard" in script
`test/utils/regen-test-files`, by introducing a new `MtsTestShard`
class. This enables sharding of ART Mainline Module code coverage runs
at the test-plan level ("meta-sharding"), as sharding at the test-run
level (provided by TradeFed) has reached its limits in ATP.

Add an indirection level in the generated file
`test/mts/tools/mts-tradefed/res/config/mts-art-tests-list-user.xml`,
which is now including "ART test list shards" (files
`test/mts/tools/mts-tradefed/res/config/mts-art-tests-list-user-shard-<N>.xml`),
instead of listing tests directly. Also generate "ART test plan
shards"
(files `test/mts/tools/mts-tradefed/res/config/mts-art-shard-N.xml`),
so that each shard can be run independently, e.g. using
`mts-tradefed`.

For now, only generate two shards, for tests that do not need device
root access:
- shard 00, containing all (supported) ART run-tests, and
- shard 01, containing Libcore CTS tests (`CtsLibcoreTestCases`).

Test: m mts && mts-tradefed run commandAndExit mts-art
Test: m mts && mts-tradefed run commandAndExit mts-art-shard-00
Test: m mts && mts-tradefed run commandAndExit mts-art-shard-01
Bug: 182575630
Change-Id: Icc1662403ccc074d6eaf70af8098f8e182ca0878
1 file changed