Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate the first batch of Xcode rules' unit tests from Java to Starlark. #323

Conversation

brentleyjones
Copy link
Collaborator

This moves tests from XcodeVersionTest.java and part of XcodeConfigTest.java. The latter is so large that I'm breaking it up into multiple changes to keep the individual ones smaller. It also stubs out the tests from AvailableXcodesTest.java, but the provider they use is restricted to built-in Starlark, so we can't actually migrate those yet.

Since the rules in apple_support are still just forwarding to the native rules, these tests will be verifying their behavior. This is what we want, because when we migrate the rule implementations themselves over to apple_support, we can verify that we did it correctly via these tests.

Unfortunately, some tests can't be migrated, because Starlark tests don't let you set --experimental_* flags in config transitions. If those flags are still needed, we may need to migrate them to Starlark as well.

PiperOrigin-RevId: 627111681
(cherry picked from commit 99ffc6a)

…ark.

This moves tests from `XcodeVersionTest.java` and part of `XcodeConfigTest.java`. The latter is so large that I'm breaking it up into multiple changes to keep the individual ones smaller. It also stubs out the tests from `AvailableXcodesTest.java`, but the provider they use is restricted to built-in Starlark, so we can't actually migrate those yet.

Since the rules in `apple_support` are still just forwarding to the native rules, these tests will be verifying their behavior. This is what we want, because when we migrate the rule implementations themselves over to `apple_support`, we can verify that we did it correctly via these tests.

Unfortunately, some tests can't be migrated, because Starlark tests don't let you set `--experimental_*` flags in config transitions. If those flags are still needed, we may need to migrate them to Starlark as well.

PiperOrigin-RevId: 627111681
(cherry picked from commit 99ffc6a)
Signed-off-by: Brentley Jones <[email protected]>
brentleyjones referenced this pull request Apr 22, 2024
…ark.

This moves tests from `XcodeVersionTest.java` and part of `XcodeConfigTest.java`. The latter is so large that I'm breaking it up into multiple changes to keep the individual ones smaller. It also stubs out the tests from `AvailableXcodesTest.java`, but the provider they use is restricted to built-in Starlark, so we can't actually migrate those yet.

Since the rules in `apple_support` are still just forwarding to the native rules, these tests will be verifying their behavior. This is what we want, because when we migrate the rule implementations themselves over to `apple_support`, we can verify that we did it correctly via these tests.

Unfortunately, some tests can't be migrated, because Starlark tests don't let you set `--experimental_*` flags in config transitions. If those flags are still needed, we may need to migrate them to Starlark as well.

PiperOrigin-RevId: 627111681
@brentleyjones brentleyjones merged commit 6961212 into master Apr 23, 2024
12 checks passed
@brentleyjones brentleyjones deleted the bj/migrate-the-first-batch-of-xcode-rules-unit-tests-from-java-to-starlark branch April 23, 2024 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants