`meson test --gdb` launches the wrapper with gdb instead of the wrappee test command
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 33
Description
**Describe the bug**
Using test wrappers will make `--gdb` option not to work, unless the wrapper is a binary itself, but is generally not expected to be tested, while we care about the wrappee.
**To Reproduce**
```meson
project('foo')
add_test_setup('default',
is_default: true,
exe_wrapper: find_program('env'),
)
test('true', find_program('true'))
```
**Expected behavior**
`meson test _build --gdb` will launch:
`/usr/bin/env gdb --quiet --nh --args /bin/true`
While it's currently launching: `gdb --quiet --nh --args /usr/bin/env /bin/true`.
It may probably be even added addressed by using another command-line option (like `--gdb-test-only`) if we don't want to break the previous behavior, but personally I find that using wrappers is breaking hardly the ability to use debuggers with tests.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the provided Meson project and compare `meson test _build --gdb` with the expected command invocation. Trace the `--gdb` handling for test setups with `exe_wrapper`; done means the wrapper runs before gdb and gdb receives `/bin/true` as the test command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, cli, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100