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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ede20afa1d08274f6441e0333fa2a9d7e307f2a0
4
- data.tar.gz: 613443a10666683373cde567608a1fc1711a6e32
3
+ metadata.gz: 39d1018bae23875555576f7b7a500c29f651da7b
4
+ data.tar.gz: 06b8a8ec97e94b361b6034b01ff45641b9815be0
5
5
  SHA512:
6
- metadata.gz: 575230c3cfc89ab7fad8e72c0ae95282d1dc99445c379290fb00f67d2de489acf7d2e6e5b53befd8a12aee1cfc1692959f900cdbe15e2764352b66d48f460d5e
7
- data.tar.gz: 55cb773f0e71dbc609e006d967abda150450d2144bf801513b4befe530105bab8fad5f5775515d0011498ea38641a7a78b100e20a84fea1369429883a18f4498
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` - optional label for device e.g. "For plugin tests only. Do not touch."
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.
@@ -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("Performig wait for ADB boot".yellow)
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
- unless devices.match(["emulator-", avd_schemes[i].launch_avd_port].join("")).nil?
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, :command_start, :command_get_devices, :command_wait_for_device, :command_get_avds
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
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AutomatedTestEmulatorRun
3
- VERSION = "1.5.1"
3
+ VERSION = "1.6.0"
4
4
  end
5
5
  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: 1.5.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-05-15 00:00:00.000000000 Z
11
+ date: 2017-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry