MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj
Bug: `cc_test` can't be used in `test_action`
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 626
- Forks
- 124
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Envoy Mobile's C++ tests fail to generate due to this internal assertion failure:
ERROR: Internal precondition failure:
An `XCSchemeInfo.TestActionInfo` should only contain testable `XCSchemeInfo.TargetInfo` values.
Reproduction steps
git clone https://github.com/jpsim/envoy.git
cd envoy
git checkout jp-rules_xcodeproj-cpp
cd mobile
./bazelw run xcodeproj
Expected behavior
According to https://github.com/buildbuddy-io/rules_xcodeproj/issues/84 it appears that cc_test should be supported, so I expected to be able to set //test/cc/unit:envoy_config_test as the test action.
Versions
- Bazel: 6.0.0
- rules_xcodeproj: 1.0.0rc2
- rules_apple: a0f8748ce89698a599149d984999eaefd834c004
- rules_swift: e769f8d6a4adae93c244f244480a3ae740f24384
Additional context
//test/cc/unit:envoy_config_testis defined here: https://github.com/envoyproxy/envoy/blob/51b4927d215df821bff04d35969eb54cd53d3b31/mobile/test/cc/unit/BUILD#L7-L16- It's an
envoy_cc_test, which is defined here: https://github.com/envoyproxy/envoy/blob/51b4927d215df821bff04d35969eb54cd53d3b31/bazel/envoy_test.bzl#L146-L193 - It defines a
native.cc_testhere: https://github.com/envoyproxy/envoy/blob/51b4927d215df821bff04d35969eb54cd53d3b31/bazel/envoy_test.bzl#L167-L193
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
Reproduce the failure from the provided Envoy checkout using ./bazelw run xcodeproj and the //test/cc/unit:envoy_config_test target. Trace how cc_test targets are placed in the generated test_action, using the referenced envoy_test.bzl definition and rules_xcodeproj issue 84 as context. Done means the target can be selected without the XCSchemeInfo assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100