-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[pigeon] Add local-only Kotlin integration tests #2852
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
[pigeon] Add local-only Kotlin integration tests #2852
Conversation
Adds a new test target to run the new shared integration tests on Kotlin, and adds the necessary native-side plumbing. This is not run by default because it requires a device or emulator to be present, and we don't have that set up for CI yet (and we don't yet have a different script entrypoint for manual vs CI tests). Enabling this in CI is tracked in flutter/flutter#111505, but landing it now allows for better manual testing of generator changes during development. Part of flutter/flutter#111505
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
|
||
| /// Returns the first device listed by `flutter devices` that targets | ||
| /// [platform], or null if there is no such device. | ||
| Future<String?> getDeviceForPlatform(String platform) async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is duplicated from the repo tooling (with minor changes). While it's not ideal to duplicate it, it's not much code, and restructuring everything to allow using the repo tooling directly on Pigeon's tests (and thus eliminating most of run_tests.*) is a much bigger project that I don't want to gate other work.
|
repo_checks test is mad about the copied tooling file. Is there an override for that check? Or should it just be added to a '3rd party' folder as suggested? |
|
I just forgot to add the license/copyright boilerplate. It's not third-party code, since we wrote the original copy. |
Adds a new test target to run the new shared integration tests on Kotlin, and adds the necessary native-side plumbing.
This is not run by default because it requires a device or emulator to be present, and we don't have that set up for CI yet (and we don't yet have a different script entrypoint for manual vs CI tests).
Enabling this in CI is tracked in
flutter/flutter#111505, but landing it now allows for better manual testing of generator changes during development.
Part of flutter/flutter#111505
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).