-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[flutter_plugin_tools] Also look for Java tests in plugin path #3742
Conversation
973b6df to
cddfe07
Compare
cddfe07 to
885beac
Compare
cyanglaz
left a comment
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.
Could we add test for the tools change. Also, are the camera tests change related to this PR?
Yes I was already looking into if it is possible to test the change in the About the changes to the camera plugin, they fix the tests that are currently failing. This PR makes those failures visible and therefore will block the tree. |
67e7176 to
cb70eff
Compare
|
@cyanglaz I added tests to make sure the
|
| ProcessCall( | ||
| p.join(plugin.path, 'example/android/gradlew'), | ||
| <String>['testDebugUnitTest', '--info'], | ||
| p.join(plugin.path, 'example/android'), |
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.
shouldn't this be android/
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.
No this would be the working directory and it needs to point to the example/android location. From there it will look up the tests in android (through the compiled version of the example app).
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.
oh, my mistake.
cyanglaz
left a comment
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.
LGTM! Thanks for the fix!
The current implementation of the
JavaTestCommandonly looks for atestfolder under the./example/android/app/srcfolder for a plugin. There are plugins that have their Java tests defined as part of the plugin implementation code (on path./android/src/test) and don't have atestfolder as part of the./example/android/app/srcpath. This means these tests are currently not executed by the plugin CI. Some examples would be:We discovered this issue when we where trying to move the Java tests of the "in_app_purchase" plugin from the
./example/android/app/src/testfolder to the./android/src/testfolder and noticed that the CI suddenly doesn't execute Java tests anymore (see PR #3732).Note that I have fixed some Java unit tests of the camera plugin which have been failing unnoticed.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
[shared_preferences]flutter_plugin_toolsare not published anymore and doesn't include a version number.flutter_plugin_toolsare not published anymore and doesn't keep track of changes in a CHANGELOG.md///).If you need help, consider asking for advice on the #hackers-new channel on Discord.