fastlane-plugin-automated_test_emulator_run 0.5.7 → 0.5.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2428aab12d4cfa4728942bb1e0ff3aab433fd8e4
|
4
|
+
data.tar.gz: d0ddf6f030afecfa5b57f81da91f8c91594da23b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 626eecc8a94bf21059951c7822310a0ae67a25c92d426e9a82aa6f3fabfc0949a49bdbb3d74ec3b97e486fd6d041ff0bd45df3864bcb0705d23d76f1a91f7edf
|
7
|
+
data.tar.gz: dfdc4840f7d64de6aaa7805e504519c6c35662d7bdbadc113218774a4ffb11d89f7a2925ab3387413e389d3ad6a1208d627b4bf33caee51100617b6001b2d2e5
|
data/lib/fastlane/plugin/automated_test_emulator_run/actions/automated_test_emulator_run_action.rb
CHANGED
@@ -66,10 +66,8 @@ module Fastlane
|
|
66
66
|
|
67
67
|
# Starting AVD
|
68
68
|
UI.message("Starting AVD....".yellow)
|
69
|
-
|
70
|
-
|
71
|
-
waitFor_emulatorBoot(sdkRoot, port, params)
|
72
|
-
|
69
|
+
launchEmulator(start_avd_command, sdkRoot, port, params)
|
70
|
+
|
73
71
|
UI.message("Starting tests".green)
|
74
72
|
begin
|
75
73
|
unless shell_command.nil?
|
@@ -100,7 +98,13 @@ module Fastlane
|
|
100
98
|
return port
|
101
99
|
end
|
102
100
|
|
103
|
-
def self.
|
101
|
+
def self.launchEmulator(start_avd_command, sdkRoot, port, params)
|
102
|
+
restart_adb(sdkRoot)
|
103
|
+
Action.sh(start_avd_command)
|
104
|
+
waitFor_emulatorBoot(start_avd_command, sdkRoot, port, params)
|
105
|
+
end
|
106
|
+
|
107
|
+
def self.waitFor_emulatorBoot(start_avd_command, sdkRoot, port, params)
|
104
108
|
UI.message("Waiting for emulator to finish booting.....".yellow)
|
105
109
|
startParams = "#{params[:avd_start_options]}"
|
106
110
|
|
@@ -118,7 +122,12 @@ module Fastlane
|
|
118
122
|
currentTime = Time.now
|
119
123
|
|
120
124
|
if (currentTime - startTime) >= timeoutInSeconds
|
121
|
-
UI.message("Emulator loading took more than 3 minutes.".yellow)
|
125
|
+
UI.message("Emulator loading took more than 3 minutes. Restarting emulator launch until.".yellow)
|
126
|
+
adb_devices_result = Action.sh("adb devices")
|
127
|
+
if adb_devices_result.include? "device offline"
|
128
|
+
launchEmulator(start_avd_command, sdkRoot, port, params)
|
129
|
+
break
|
130
|
+
end
|
122
131
|
return false
|
123
132
|
end
|
124
133
|
|
@@ -130,6 +139,12 @@ module Fastlane
|
|
130
139
|
end
|
131
140
|
end
|
132
141
|
|
142
|
+
def self.restart_adb(sdkRoot)
|
143
|
+
UI.message("Restarting adb..".green)
|
144
|
+
Action.sh(sdkRoot + "/platform-tools/adb kill-server")
|
145
|
+
Action.sh(sdkRoot + "/platform-tools/adb start-server")
|
146
|
+
end
|
147
|
+
|
133
148
|
def self.waitFor_emulatorStop(sdkRoot, port, params)
|
134
149
|
UI.message("Shutting down emulator...".green)
|
135
150
|
Action.sh(sdkRoot + "/platform-tools/adb -s " + ["emulator-", port].join("") + " emu kill &>/dev/null")
|
@@ -137,10 +152,6 @@ module Fastlane
|
|
137
152
|
delayInSeconds = 45.0
|
138
153
|
sleep(delayInSeconds)
|
139
154
|
|
140
|
-
UI.message("Restarting adb..".green)
|
141
|
-
Action.sh(sdkRoot + "/platform-tools/adb kill-server")
|
142
|
-
Action.sh(sdkRoot + "/platform-tools/adb start-server")
|
143
|
-
|
144
155
|
UI.message("Deleting emulator....".green)
|
145
156
|
Action.sh(sdkRoot + "/tools/android delete avd -n #{params[:avd_name]}")
|
146
157
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.
|
4
|
+
version: 0.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamil Krzyk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|