fastlane-plugin-automated_test_emulator_run 1.5.1 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/fastlane/plugin/automated_test_emulator_run/actions/automated_test_emulator_run_action.rb +22 -3
- data/lib/fastlane/plugin/automated_test_emulator_run/factory/adb_controller_factory.rb +8 -1
- data/lib/fastlane/plugin/automated_test_emulator_run/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39d1018bae23875555576f7b7a500c29f651da7b
|
4
|
+
data.tar.gz: 06b8a8ec97e94b361b6034b01ff45641b9815be0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffa6c3667543cd937471a10055f512d11357e27785df1f9b3996ff658f4228b3956291ff2c55582c29fe4ea0370223161bb58faf80fa64d1b5c9c118a770a190
|
7
|
+
data.tar.gz: 15c7fe9ad06ecc525bfdfc8271222189a244ce086fa407682ecf6b241f599242c8350b4bc1a7f9ff23da712f7be79dc46861f23d9e32c27a5f3d81753dfb0637
|
data/README.md
CHANGED
@@ -60,7 +60,7 @@ Parameters:
|
|
60
60
|
<br>For official help refer to `avdmanager` binary file: `<sdk_root>/tools/bin/avdmanager create avd`
|
61
61
|
- `avd_name` - name of your AVD, avoid using spaces, this field is necessary
|
62
62
|
- `create_avd_package` - path to system image in example "system-images;android-23;google_apis;x86_64"
|
63
|
-
- `create_avd_device` -
|
63
|
+
- `create_avd_device` - name of your device visible on `avdmanager list device` list
|
64
64
|
- `create_avd_tag` - the sys-img tag to use for the AVD. e.g. if you are using Google Apis then set it to "google_apis"
|
65
65
|
- `create_avd_abi` - abi for AVD e.g. "x86" or "x86_64" (https://developer.android.com/ndk/guides/abis.html)
|
66
66
|
- `create_avd_hardware_config_filepath` - path to config.ini file containing custom config for your AVD. After AVD is created this file will be copied into AVD location before it launches.
|
data/lib/fastlane/plugin/automated_test_emulator_run/actions/automated_test_emulator_run_action.rb
CHANGED
@@ -101,7 +101,7 @@ module Fastlane
|
|
101
101
|
|
102
102
|
# Wait for AVDs finish booting
|
103
103
|
UI.message("Waiting for AVDs to finish booting.".yellow)
|
104
|
-
UI.message("
|
104
|
+
UI.message("Performing wait for ADB boot".yellow)
|
105
105
|
adb_launch_complete = wait_for_emulator_boot_by_adb(adb_controller, avd_schemes, "#{params[:AVD_adb_launch_timeout]}")
|
106
106
|
|
107
107
|
# Wait for AVD params finish booting
|
@@ -149,6 +149,13 @@ module Fastlane
|
|
149
149
|
|
150
150
|
if all_avd_launched
|
151
151
|
UI.message("AVDs Booted!".green)
|
152
|
+
if params[:logcat]
|
153
|
+
for i in 0...avd_schemes.length
|
154
|
+
device = ["emulator-", avd_schemes[i].launch_avd_port].join('')
|
155
|
+
cmd = [adb_controller.adb_path, '-s', device, 'logcat -c'].join(' ')
|
156
|
+
Action.sh(cmd) unless devices.match(device).nil?
|
157
|
+
end
|
158
|
+
end
|
152
159
|
else
|
153
160
|
for i in 0...avd_schemes.length
|
154
161
|
if params[:verbose]
|
@@ -188,7 +195,13 @@ module Fastlane
|
|
188
195
|
# Clean up
|
189
196
|
for i in 0...avd_schemes.length
|
190
197
|
# Kill all emulators
|
191
|
-
|
198
|
+
device = ["emulator-", avd_schemes[i].launch_avd_port].join("")
|
199
|
+
unless devices.match(device).nil?
|
200
|
+
if params[:logcat]
|
201
|
+
file = [device, '.log'].join('')
|
202
|
+
cmd = [adb_controller.adb_path, '-s', device, 'logcat -d >', file].join(' ')
|
203
|
+
Action.sh(cmd)
|
204
|
+
end
|
192
205
|
Action.sh(avd_controllers[i].command_kill_device)
|
193
206
|
end
|
194
207
|
|
@@ -456,6 +469,12 @@ module Fastlane
|
|
456
469
|
default_value: false,
|
457
470
|
is_string: false,
|
458
471
|
optional: true),
|
472
|
+
FastlaneCore::ConfigItem.new(key: :logcat,
|
473
|
+
env_name: "ADB_LOGCAT",
|
474
|
+
description: "Allows to turn logcat on/off so you can debug crashes and such",
|
475
|
+
default_value: false,
|
476
|
+
is_string: false,
|
477
|
+
optional: true),
|
459
478
|
]
|
460
479
|
end
|
461
480
|
|
@@ -472,4 +491,4 @@ module Fastlane
|
|
472
491
|
end
|
473
492
|
end
|
474
493
|
end
|
475
|
-
end
|
494
|
+
end
|
@@ -2,7 +2,12 @@ module Fastlane
|
|
2
2
|
module Factory
|
3
3
|
|
4
4
|
class ADB_Controller
|
5
|
-
attr_accessor :command_stop,
|
5
|
+
attr_accessor :command_stop,
|
6
|
+
:command_start,
|
7
|
+
:command_get_devices,
|
8
|
+
:command_wait_for_device,
|
9
|
+
:command_get_avds,
|
10
|
+
:adb_path
|
6
11
|
end
|
7
12
|
|
8
13
|
class AdbControllerFactory
|
@@ -44,6 +49,8 @@ module Fastlane
|
|
44
49
|
sh_wait_for_device_adb
|
45
50
|
].join(" ")
|
46
51
|
|
52
|
+
adb_controller.adb_path = path_adb
|
53
|
+
|
47
54
|
adb_controller.command_get_avds = [
|
48
55
|
path_avdmanager_binary,
|
49
56
|
sh_list_avd_adb].join(" ").chomp
|
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: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamil Krzyk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|