Skip to content

Transition to exec configuration for bazel test --run_under=... --platforms=... #22624

@tpudlik

Description

@tpudlik

Description of the bug:

bazel test --run_under=:test_runner --platforms=:device is a natural way to run on-device tests with Bazel: you point --run_under to your test runner (which flashes tests to the hardware), and --platforms to the target device platform.

But it's awkward in practice because the target that --run_under points to is built for the target platform, even though it will execute on the exec platform. So you need to wrap your runner into a platform_data:

platform_data(
  name = "run_under_wrapper",
  target = ":test_runner",
  platform = "@local_config_platform//:host",
)

@katre @gregestren

Which category does this issue belong to?

Configurability

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No.

Have you found anything relevant by searching the web?

This is similar to the case of bazel run --run_under --platforms, discussed here.

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

Labels

P1I'll work on this now. (Assignee required)team-Configurabilityplatforms, toolchains, cquery, select(), config transitionstype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions