-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
refactor: unify installation on devices & emulators #1123
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1123 +/- ##
==========================================
- Coverage 71.41% 70.97% -0.44%
==========================================
Files 20 21 +1
Lines 1770 1747 -23
==========================================
- Hits 1264 1240 -24
- Misses 506 507 +1
Continue to review full report at Codecov.
|
This change is actually not independent from #1101. Sorry for the bother. Closing. |
OK, I fixed this PR up and it is now independent and ready to review. Sorry for the inconvenience. |
This change replaces the almost identical methods `device.install` and `emulator.install` with the generic `target.install`.
188d885
to
6737629
Compare
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.
Unified code and change LGTM 👍
Motivation and Context
device.install
andemulator.install
are virtually identical. The only notable difference is thatemulator.install
has some retry logic that is supposed to mitigate emulator hangs. The same goes for the unit tests.Joining these methods reduces the code we have to maintain and makes upcoming refactors easier.
Description
This change replaces
device.install
andemulator.install
with the generictarget.install
.The old installation methods did also resolve the passed target specification (by calling
{device,emulator}.resolveTarget
) if necessary. The new installation method expects the given installation target to be resolved already. This allows for a better separation of concerns.Testing
TypeError: Cannot read property 'apkPaths' of undefined
)