rules_apple icon indicating copy to clipboard operation
rules_apple copied to clipboard

Add test_host_is_bundle_loader configuration

Open keith opened this issue 3 years ago • 5 comments

The default behavior for a test that has a test_host is to use that test host app as the -bundle_loader linker argument. This is required if you want to test APIs from the host app, but in the case you want to use a host for other reasons, like testing iOS features that require you to run in an app, you might not want this. This also works around some surprising behavior where linkopts from the app are applied to the test bundle as well.

keith avatar Sep 21 '22 23:09 keith

I only added this to iOS right now, figured we could add as needed to other rules ¯_(ツ)_/¯

keith avatar Sep 21 '22 23:09 keith

Feels a little odd to not have it on all the ones that have a test host.

brentleyjones avatar Sep 21 '22 23:09 brentleyjones

filed https://github.com/bazelbuild/bazel/issues/16327

keith avatar Sep 21 '22 23:09 keith

yea i agree, im torn between it's overhead that might not be used and we should add it as needed, vs that's weird. definitely also being lazy about adding more test targets 🙃

keith avatar Sep 21 '22 23:09 keith

I think the overhead is next to nothing, so it being weird probably outweighs it.

brentleyjones avatar Sep 22 '22 00:09 brentleyjones

now that all the test rule's attributes are unified i think we're good with the tests we have here

keith avatar Aug 21 '23 18:08 keith