Test command to take a list of cache opted targets for Coverage

Tuist test command for now has only flag option –binary-cache/–no-binary-cache
Ignore binary cache and use sources only. (env: TUIST_TEST_BINARY_CACHE) (default: --binary-cache)

But I’d want to be able to pass a list of targets like in tuist generate command in order to gather coverage for only those targets and use cached binaries for other targets.

Note: the benefit is in build time and using cache while giving an option to select targets for coverage.

1 Like

@ivanglushko, in Tuist there are two separate mechanisms at play here:

  1. Binary replacement: Which targets get replaced with pre-built binaries during builds
  2. Test target selection: Which targets Tuist chooses to run tests for

For binary replacement, we’re actively working on giving you more control - there’s an ongoing effort to add that flexibility.

For test target selection, Tuist currently handles this automatically without user control. The selection logic is built into Tuist’s test resolution.

Are you looking for more control over test target selection as well? I want to make sure I understand your full use case here - it sounds like there might be something specific you’re trying to achieve that our current approach doesn’t support.

1 Like