generator: add support for oneof test groups

This introduces a new way for our config to select test suites to run
based on files in a CQ run.

In a "oneof test" scenario, there will be a list of test groups, e.g.
[arm-arch-tast-cq, amd64-arch-tast-cq], and we'll pick one test suite
from each of those groups to satisfy the oneof rules.

By contrast, in an "only test" scenario, there will be test groups from
which we'll select all test suites.

Comparing all test group situations:
1. default: no test group in scope for the CL. Run the normal big list
   of test suites.
2. oneof(list(test_groups)): run one test suite from each of the
   provided test groups, and don't run any of the test suites not
   referenced by those groups.
3. only(list(test_groups)): run all test suites from all of the provided
   test groups.
4. also(list(test_groups)): like default, but also run all test suites
   from the provided test groups.

See go/cq-oneof

Bug: 1130018
Change-Id: I8ebafac3420a470cede63929c54824fc14e1c005
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/go/+/2421423
Commit-Queue: Sean Abraham <seanabraham@chromium.org>
Tested-by: Sean Abraham <seanabraham@chromium.org>
Reviewed-by: Navil Perez <navil@google.com>
5 files changed