bazelbuild / bazelbuild/rules_apple
test_env value truncated if has comma
- Dominant language
- Starlark
- Stars
- 593
- Forks
- 334
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 9
Description
The [xctest runner](
https://github.com/bazelbuild/rules_apple/blob/dc5865200b67c00d38dddc245ea72f43caa7bfc9/apple/testing/default_runner/ios_xctestrun_runner.template.sh#L121) uses comma as separator to parse test_env, however it's common that the environment variable value contains comma as well, here is an example in grpc:
```
--test_env=GRPC_EXPERIMENTS=event_engine_client,event_engine_listener \
--test_env=GRPC_TRACE=event_engine,api \
```
This works fine in Linux, but on ios the environment variables passed to the test become
```
GRPC_EXPERIMENTS=event_engine_client
GRPC_TRACE=event_engine
event_engine_listener=
api=
```
Contributor guide
Research direction
Start with apple/testing/default_runner/ios_xctestrun_runner.template.sh around line 121 and trace how test_env is parsed. Verify that comma-separated values remain part of their environment variable instead of becoming extra variables, then check the xctest runner behavior against the examples in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, shell
- Domain
- mobile-dev, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100