ExternalRunnerTestInfo
Provider that signals that a rule can be tested using an external runner. This is the Buck1-compatible API for tests.
ExternalRunnerTestInfo.command
ExternalRunnerTestInfo.command: None | list[Artifact | CellPath | CellRoot | Label | OutputArtifact | ProjectRoot | ResolvedStringWithMacros | TaggedCommandLine | TargetLabel | TransitiveSetArgsProjection | WriteJsonCliArgs | cmd_args | str | RunInfo] | tuple[Artifact | CellPath | CellRoot | Label | OutputArtifact | ProjectRoot | ResolvedStringWithMacros | TaggedCommandLine | TargetLabel | TransitiveSetArgsProjection | WriteJsonCliArgs | cmd_args | str | RunInfo, ...]
The command for this test. The external test runner is what gives meaning to this command.
ExternalRunnerTestInfo.contacts
ExternalRunnerTestInfo.contacts: None | list[str] | tuple[str, ...]
The contacts for this test. This is largely expected to be an oncall, though it's not validated in any way.
ExternalRunnerTestInfo.default_executor
ExternalRunnerTestInfo.default_executor: CommandExecutorConfig | None
Default executor to use to run tests. If none is passed we will default to the execution platform.
ExternalRunnerTestInfo.env
ExternalRunnerTestInfo.env: None | dict[str, Artifact | CellPath | CellRoot | Label | OutputArtifact | ProjectRoot | ResolvedStringWithMacros | TaggedCommandLine | TargetLabel | TransitiveSetArgsProjection | WriteJsonCliArgs | cmd_args | str | RunInfo]
The environment for this test. Here again, the external test runner is what gives this meaning.
ExternalRunnerTestInfo.exec_group
ExternalRunnerTestInfo.exec_group: ExecGroup | None
The execution group whose execution platform runs the tests when the test runner does not request an executor. When the analysis of a rule that declares the group creates the test info, the group's executor is recorded in default_executor, so it still applies when another rule returns the test info. Nothing is recorded when the group has no compatible execution platform, when the rule does not declare the group, or outside rule analysis; the test then resolves the group against the tested target when it runs. A passed default_executor wins and the group is not resolved, so copying a test info field by field works in any rule. A rule that declares named groups but not DefaultExecGroup must set exec_group or default_executor; executor_overrides does not replace them, as the tests run in the default group whenever no override is picked.
ExternalRunnerTestInfo.executor_overrides
ExternalRunnerTestInfo.executor_overrides: None | dict[str, CommandExecutorConfig]
Executors that Tpx can use to override the default executor.
ExternalRunnerTestInfo.labels
ExternalRunnerTestInfo.labels: None | list[str] | tuple[str, ...]
The labels for this test.
ExternalRunnerTestInfo.local_resources
ExternalRunnerTestInfo.local_resources: None | dict[str, Label | None]
Mapping from a local resource type to a target with a corresponding provider. Required types are passed from test runner. If the value for a corresponding type is omitted it means local resource should be ignored when executing tests even if those are passed as required from test runner.
ExternalRunnerTestInfo.required_local_resources
ExternalRunnerTestInfo.required_local_resources: None | list[RequiredTestLocalResource] | tuple[RequiredTestLocalResource, ...]
List of local resource types which should be set up additionally to those which are passed from test runner. Allows specifying local resources on a per-rule basis.
ExternalRunnerTestInfo.run_from_project_root
ExternalRunnerTestInfo.run_from_project_root: None | bool
Whether this test should run from the project root, as opposed to the cell root
Defaults to True.
ExternalRunnerTestInfo.supports_test_execution_caching
ExternalRunnerTestInfo.supports_test_execution_caching: None | bool
Whether test execution results can be read from the remote action cache.
ExternalRunnerTestInfo.test_type
ExternalRunnerTestInfo.test_type: str
The type of this test.
ExternalRunnerTestInfo.use_project_relative_paths
ExternalRunnerTestInfo.use_project_relative_paths: None | bool
Whether this test should use relative paths
ExternalRunnerTestInfo.worker
ExternalRunnerTestInfo.worker: None | WorkerInfo
Configuration needed to spawn a new worker. This worker will be used to run every single command related to test execution, including listing.