fastlane-plugin-automated_test_emulator_run 0.2 → 0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c444151e3e03b3d479e1ff688f0d16f314d53e5
|
4
|
+
data.tar.gz: 6214b83edc38e37f29cf4406428456afe5cd0f53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c36d9a80a04a7bbc3519e07e6ae958ff12a64e76681da3fb82900453afd74e3a29e94ce54c6fd34f226084feea2e17b574b191d8333d2ee6238bb0956582e5c6
|
7
|
+
data.tar.gz: 79db7ef0f72fc2fad1501212b5a2ad3d019403341e86f9b620f95c91310fea0dcf07a4f1e36cc066fb136d06e68e799936ad2d4561a5efe6a222aa1965e6d6a5
|
data/lib/fastlane/plugin/automated_test_emulator_run/actions/automated_test_emulator_run_action.rb
CHANGED
@@ -22,21 +22,28 @@ module Fastlane
|
|
22
22
|
|
23
23
|
# Set up params
|
24
24
|
UI.message("Preparing parameters...".yellow)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
25
|
+
|
26
|
+
# AVD general params
|
27
|
+
sdkRoot = "#{params[:sdk_path]}"
|
28
|
+
avd_name = "--name \"#{params[:avd_name]}\""
|
29
|
+
|
30
|
+
# AVD create params
|
31
|
+
target_id = "--target \"#{params[:target_id]}\""
|
32
|
+
avd_abi = "--abi #{params[:avd_abi]}" unless params[:avd_abi].nil?
|
33
|
+
avd_tag = "--tag #{params[:avd_tag]}" unless params[:avd_tag].nil?
|
34
|
+
avd_create_options = params[:avd_create_options] unless params[:avd_create_options].nil?
|
35
|
+
|
36
|
+
# AVD start params
|
37
|
+
emulator_binary = "#{params[:emulator_binary]}"
|
38
|
+
avd_initdata = "-wipe-data -initdata #{params[:initdata_snapshot_path]}" unless params[:initdata_snapshot_path].nil?
|
39
|
+
avd_port = ["-port", port].join(" ")
|
40
|
+
avd_start_options = params[:avd_start_options] unless params[:avd_start_options].nil?
|
34
41
|
|
35
42
|
# Set up commands
|
36
43
|
UI.message("Setting up run commands".yellow)
|
37
44
|
create_avd_command = [sdkRoot + "/tools/android", "create avd", avd_name, target_id, avd_abi, avd_tag, avd_create_options].join(" ")
|
38
45
|
get_devices_command = sdkRoot + "/tools/android list avd".chomp
|
39
|
-
start_avd_command = [sdkRoot + "/tools/" + emulator_binary, avd_port, "-avd #{params[:avd_name]}", avd_initdata, "
|
46
|
+
start_avd_command = [sdkRoot + "/tools/" + emulator_binary, avd_port, "-avd #{params[:avd_name]}", avd_initdata, avd_start_options, "&>#{file.path} &"].join(" ")
|
40
47
|
shell_command = "#{params[:shell_command]}" unless params[:shell_command].nil?
|
41
48
|
gradle_task = "#{params[:gradle_task]}" unless params[:gradle_task].nil?
|
42
49
|
|
@@ -144,17 +151,13 @@ module Fastlane
|
|
144
151
|
description: "The sys-img tag to use for the AVD. The default is to auto-select if the platform has only one tag for its system images",
|
145
152
|
is_string: true,
|
146
153
|
optional: true),
|
147
|
-
FastlaneCore::ConfigItem.new(key: :initdata_snapshot_path,
|
148
|
-
env_name: "INIT_DATA_PATH",
|
149
|
-
description: "The path to userdata-qemu which will be used to initialize AVD status",
|
150
|
-
is_string: true,
|
151
|
-
optional: true),
|
152
154
|
FastlaneCore::ConfigItem.new(key: :sdk_path,
|
153
155
|
env_name: "SDK_PATH",
|
154
156
|
description: "The path to your android sdk directory (root). ANDROID_HOME by default",
|
155
157
|
is_string: true,
|
156
158
|
default_value: ENV['ANDROID_HOME'],
|
157
159
|
optional: true),
|
160
|
+
|
158
161
|
FastlaneCore::ConfigItem.new(key: :shell_command,
|
159
162
|
env_name: "SHELL_COMMAND",
|
160
163
|
description: "The shell command you want to execute",
|
@@ -173,12 +176,23 @@ module Fastlane
|
|
173
176
|
optional: true,
|
174
177
|
conflicting_options: [:shell_command],
|
175
178
|
is_string: true),
|
179
|
+
|
176
180
|
FastlaneCore::ConfigItem.new(key: :emulator_binary,
|
177
181
|
env_name: "EMULATOR_BINARY",
|
178
182
|
description: "Emulator binary file you would like to use in order to start emulator",
|
179
183
|
is_string: true,
|
180
184
|
default_value: "emulator",
|
181
185
|
optional: true),
|
186
|
+
FastlaneCore::ConfigItem.new(key: :avd_start_options,
|
187
|
+
env_name: "AVD_START_OPTIONS",
|
188
|
+
description: "Additonal run parameters e.g. gpu, audio, boot animation",
|
189
|
+
is_string: true,
|
190
|
+
optional: true),
|
191
|
+
FastlaneCore::ConfigItem.new(key: :initdata_snapshot_path,
|
192
|
+
env_name: "INIT_DATA_PATH",
|
193
|
+
description: "The path to userdata-qemu which will be used to initialize AVD status",
|
194
|
+
is_string: true,
|
195
|
+
optional: true),
|
182
196
|
]
|
183
197
|
end
|
184
198
|
|