Respect binary args in --run_under
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the feature request:
[--run_under](https://bazel.build/docs/user-manual#test-run-under) can be set to the label of a binary build target. However, if that binary target has [args](https://bazel.build/reference/be/common-definitions#binary.args), these `args` are ignored rather than passed to the binary. This is unexpected and inconvenient, reducing the expressiveness of `--run_under`.
### Which category does this issue belong to?
_No response_
### What underlying problem are you trying to solve with this feature?
I'd like to use a [native_binary](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/native_binary_doc.md) wrapper to encapsulate the `args` that a test runner binary should be invoked with.
### Which operating system are you running Bazel on?
Linux
### What is the output of `bazel info release`?
8.1.0
### 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` ?
```text
```
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Start with the --run_under user-manual entry and the linked binary.args and native_binary documentation, then trace how a labeled binary target is invoked for test execution. Done means args declared on the --run_under binary target are passed to that binary, with coverage for the reported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100