fastlane-plugin-automated_test_emulator_run 0.2 → 0.3

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: c4669cfaa83d180ff39a52452c4e7b30faaa4fed
4
- data.tar.gz: e52e19339d51acb87716c12de94b406c447b483c
3
+ metadata.gz: 8c444151e3e03b3d479e1ff688f0d16f314d53e5
4
+ data.tar.gz: 6214b83edc38e37f29cf4406428456afe5cd0f53
5
5
  SHA512:
6
- metadata.gz: afec86323dc51deda715f00c636ff9f9b712c6889454dd23a48d17a98aab6ef902859e7ffbe5f12ea614fe2e1b158ee4a531605c9a279bb29067caceeb9bdc5d
7
- data.tar.gz: 4426c197fe696a213a06a491f017576ccc61802f44cb6db0c87813123601cbed0edee6f9b66baad8c1dc423d507c2acf64fe9b34bca5c862178077aba3cd656f
6
+ metadata.gz: c36d9a80a04a7bbc3519e07e6ae958ff12a64e76681da3fb82900453afd74e3a29e94ce54c6fd34f226084feea2e17b574b191d8333d2ee6238bb0956582e5c6
7
+ data.tar.gz: 79db7ef0f72fc2fad1501212b5a2ad3d019403341e86f9b620f95c91310fea0dcf07a4f1e36cc066fb136d06e68e799936ad2d4561a5efe6a222aa1965e6d6a5
@@ -22,21 +22,28 @@ module Fastlane
22
22
 
23
23
  # Set up params
24
24
  UI.message("Preparing parameters...".yellow)
25
- avd_name = "--name \"#{params[:avd_name]}\""
26
- target_id = "--target \"#{params[:target_id]}\""
27
- avd_abi = "--abi #{params[:avd_abi]}" unless params[:avd_abi].nil?
28
- emulator_binary = "#{params[:emulator_binary]}"
29
- avd_tag = "--tag #{params[:avd_tag]}" unless params[:avd_tag].nil?
30
- avd_create_options = params[:avd_create_options] unless params[:avd_create_options].nil?
31
- avd_initdata = "-wipe-data -initdata #{params[:initdata_snapshot_path]}" unless params[:initdata_snapshot_path].nil?
32
- avd_port = ["-port", port].join(" ")
33
- sdkRoot = "#{params[:sdk_path]}"
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, "-gpu on -no-boot-anim &>#{file.path} &"].join(" ")
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
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AutomatedTestEmulatorRun
3
- VERSION = "0.2"
3
+ VERSION = "0.3"
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.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kamil Krzyk