fastlane-plugin-automated_test_emulator_run 0.4.1 → 0.4.2
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: 2c49d491f28e505ad740a99349488e8ac46aa43f
|
4
|
+
data.tar.gz: 6ab230db3d006054f62e3b948165bc9b2ebbe869
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3791a996f5e14d2820a1508d8ba5fb88d5c38bdb52398f99e74182e07f0c7fd7e2e34a7609282b9ce1a90de3d15c69596142e9ba2f16cd42515db9500f03ef07
|
7
|
+
data.tar.gz: 99c2c583ec1863a6d9d8d4711d03486bbc2cedffc7dcc894a024d992421fd3a86a19d8cb1fcd466b5e8c30e984a5c7502a57cbcce2be20b169392dbf36165a5e
|
data/lib/fastlane/plugin/automated_test_emulator_run/actions/automated_test_emulator_run_action.rb
CHANGED
@@ -7,7 +7,6 @@ module Fastlane
|
|
7
7
|
end
|
8
8
|
|
9
9
|
class AutomatedTestEmulatorRunAction < Action
|
10
|
-
emulatorStarted = false
|
11
10
|
|
12
11
|
def self.run(params)
|
13
12
|
gradle = Helper::GradleHelper.new(gradle_path: Dir["./gradlew"].last)
|
@@ -71,9 +70,11 @@ module Fastlane
|
|
71
70
|
|
72
71
|
# Starting AVD
|
73
72
|
UI.message("Starting AVD....".yellow)
|
73
|
+
|
74
|
+
emulatorStarted = false
|
74
75
|
begin
|
75
76
|
Action.sh(start_avd_command)
|
76
|
-
waitFor_emulatorBoot(sdkRoot, port, params)
|
77
|
+
emulatorStarted = waitFor_emulatorBoot(sdkRoot, port, params)
|
77
78
|
|
78
79
|
UI.message("Starting tests".green)
|
79
80
|
begin
|
@@ -86,8 +87,9 @@ module Fastlane
|
|
86
87
|
UI.message("Using gradle task".green)
|
87
88
|
gradle.trigger(task: params[:gradle_task], flags: params[:gradle_flags], serial: nil)
|
88
89
|
end
|
90
|
+
|
89
91
|
ensure
|
90
|
-
waitFor_emulatorStop(sdkRoot, port, params, file)
|
92
|
+
waitFor_emulatorStop(sdkRoot, port, params, file, emulatorStarted)
|
91
93
|
end
|
92
94
|
ensure
|
93
95
|
file.close
|
@@ -126,20 +128,19 @@ module Fastlane
|
|
126
128
|
|
127
129
|
if (currentTime - startTime) >= timeoutInSeconds
|
128
130
|
UI.message("Emulator loading took more than 2 minutes and 30 seconds. Not waiting anymore and trying to run with devices only!".yellow)
|
129
|
-
|
131
|
+
return false
|
130
132
|
end
|
131
133
|
|
132
134
|
if stdout.strip == "1"
|
133
|
-
emulatorStarted = true
|
134
135
|
UI.message("Emulator Booted!".green)
|
135
|
-
|
136
|
+
return true
|
136
137
|
end
|
137
138
|
end
|
138
139
|
end
|
139
140
|
end
|
140
141
|
|
141
|
-
def self.waitFor_emulatorStop(sdkRoot, port, params, file)
|
142
|
-
if emulatorStarted
|
142
|
+
def self.waitFor_emulatorStop(sdkRoot, port, params, file, emulatorStarted)
|
143
|
+
if emulatorStarted == true
|
143
144
|
adb = Helper::AdbHelper.new(adb_path: sdkRoot + "/platform-tools/adb")
|
144
145
|
temp = File.open(file.path).read
|
145
146
|
|