fastlane-plugin-automated_test_emulator_run 0.5.12 → 0.5.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43feb1b897dcbd45493a3b1c681aced15f75156f
4
- data.tar.gz: 503880f92c49c4aa0b5d17736f1147fc925ed5ad
3
+ metadata.gz: 3070c7dec3e0bcf261efbf9e2608910a0fe068f4
4
+ data.tar.gz: 9c4fdb8f55df7c2e980d4e785159269d9b33246d
5
5
  SHA512:
6
- metadata.gz: 357d16d6d9d1067f8802543cb457e5e8a4b708854be3c3e151a610540cad0440f78cb7df5493fa2d5a1dba3a17ea78cef607f7d364efc66857cc320e34809b87
7
- data.tar.gz: 5bf000e5bcc352db3839ff0482b866e8d587cf919d064770b020cc2c34c579121ac2232587d43ecd3bfebd4f69e84f10b35d2d4b6f64e9f47267563dc932fd17
6
+ metadata.gz: 4cb6bf31416caba2297db471f4a2881244af67d767833963fada9ec28cf88cbde741cc2cc3bfc48bd68375f71f9fcfa9083f5edb4cb19fc7fdb344d45068cd80
7
+ data.tar.gz: 1e35fbc09bd0ba8bc96541f30a8af42da7f7deaa47d1d2a3b483a2775e243c36cb9a1e13ba114acdec6737c22fd56c48638318c3763dc6a833ef2e660652eaf6
@@ -125,6 +125,11 @@ module Fastlane
125
125
  UI.message("Emulator loading took more than 3 minutes. Restarting emulator launch until.".yellow)
126
126
  adb_devices_result = Action.sh(sdkRoot + "/platform-tools/adb devices")
127
127
  if adb_devices_result.include? "offline"
128
+ kill_emulator(sdkRoot, port, params)
129
+
130
+ delayInSeconds = 20.0
131
+ sleep(delayInSeconds)
132
+
128
133
  launchEmulator(start_avd_command, sdkRoot, port, params)
129
134
  break
130
135
  end
@@ -145,17 +150,25 @@ module Fastlane
145
150
  Action.sh(sdkRoot + "/platform-tools/adb start-server")
146
151
  end
147
152
 
148
- def self.waitFor_emulatorStop(sdkRoot, port, params)
153
+ def self.kill_emulator(sdkRoot, port, params)
149
154
  UI.message("Shutting down emulator...".green)
150
155
  Action.sh(sdkRoot + "/platform-tools/adb -s " + ["emulator-", port].join("") + " emu kill &>/dev/null")
156
+ end
151
157
 
152
- delayInSeconds = 45.0
153
- sleep(delayInSeconds)
154
-
158
+ def self.delete_emulator(sdkRoot, port, params)
155
159
  UI.message("Deleting emulator....".green)
156
160
  Action.sh(sdkRoot + "/tools/android delete avd -n #{params[:avd_name]}")
157
161
  end
158
162
 
163
+ def self.waitFor_emulatorStop(sdkRoot, port, params)
164
+ kill_emulator(sdkRoot, port, params)
165
+
166
+ delayInSeconds = 20.0
167
+ sleep(delayInSeconds)
168
+
169
+ delete_emulator(sdkRoot, port, params)
170
+ end
171
+
159
172
  def self.available_options
160
173
  [
161
174
  FastlaneCore::ConfigItem.new(key: :avd_name,
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AutomatedTestEmulatorRun
3
- VERSION = "0.5.12"
3
+ VERSION = "0.5.13"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-automated_test_emulator_run
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.12
4
+ version: 0.5.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kamil Krzyk