New flag to flutter drive to skip installing fresh app on device#30818
Merged
christopherfujino merged 12 commits intoflutter:masterfrom Apr 15, 2019
Merged
New flag to flutter drive to skip installing fresh app on device#30818christopherfujino merged 12 commits intoflutter:masterfrom
flutter drive to skip installing fresh app on device#30818christopherfujino merged 12 commits intoflutter:masterfrom
Conversation
be29b54 to
6ca8bce
Compare
flutter drive to skip installing fresh app on device
chunhtai
reviewed
Apr 12, 2019
|
|
||
| Device _device; | ||
| Device get device => _device; | ||
| bool get shouldBuild => argResults['build'] ?? true; |
Contributor
There was a problem hiding this comment.
Suggested change
| bool get shouldBuild => argResults['build'] ?? true; | |
| bool get shouldBuild => argResults['build']; |
| observatoryPort: command.observatoryPort, | ||
| ), | ||
| platformArgs: platformArgs, | ||
| prebuiltApplication: !command.shouldBuild, |
Contributor
There was a problem hiding this comment.
Rather than negate this here I would expose the negative in the getter as shouldSkipBuild
Contributor
There was a problem hiding this comment.
I guess you use it the other way too...NBD then
| when(mockDevice.getLogReader()).thenReturn(mockDeviceLogReader); | ||
| final MockLaunchResult mockLaunchResult = MockLaunchResult(); | ||
| when(mockLaunchResult.started).thenReturn(true); | ||
| when(mockDevice.startApp( |
Contributor
There was a problem hiding this comment.
I would indent these twice
Contributor
Author
There was a problem hiding this comment.
Cool, yeah, I don't like this look anyway :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In response to the issue below, I added a
--build/--no-buildflag to theflutter drivecommand (it defaults to the former, the previous behavior). This is for situations where the app is already on the device and its desired to run the drive test using the existing app, either for speed or to preserve some state from a prior run (see issue).Related Issues
flutter_driver does not support running a test on a pre-installed app #28662
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.