Skip to content

Commit

Permalink
fix(android): AmInstrumentTestParser should prepare device once per p…
Browse files Browse the repository at this point in the history
…arsing attempt (MarathonLabs#881)
  • Loading branch information
Malinskiy authored Jan 12, 2024
1 parent 76e4341 commit 034a996
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ class AmInstrumentTestParser(
vendorConfiguration: VendorConfiguration.AndroidConfiguration,
testBundles: List<AndroidTestBundle>
): List<Test> {
val androidAppInstaller = AndroidAppInstaller(configuration)
androidAppInstaller.prepareInstallation(device)

return testBundles.flatMap { bundle ->
val androidTestBundle =
AndroidTestBundle(bundle.application, bundle.testApplication, bundle.extraApplications, bundle.splitApks)
Expand All @@ -82,8 +85,6 @@ class AmInstrumentTestParser(
supportedFeatures = device.supportedFeatures,
coroutineScope = device,
)
val androidAppInstaller = AndroidAppInstaller(configuration)
androidAppInstaller.prepareInstallation(device)
val channel = device.executeTestRequest(runnerRequest)
var observedAnnotations = false

Expand Down

0 comments on commit 034a996

Please sign in to comment.