fastlane-plugin-stream_actions 0.3.11 → 0.3.12
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c73c04e5045faac03b3b1f26223b28ad5dae5a90df3061877081f37b6fd91bc
|
4
|
+
data.tar.gz: df4dd4f8eeff082936d12462d00eebad7448848b6c5a72606eb427a4c5fa2ae4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba945e29b576de44ec2d3817adda733455e5644eb2786adbabfa56da40a618be563f1a7586a3bee5b343ef16774ec1708cc5b45b454f09d5ba710c270fdc65ac
|
7
|
+
data.tar.gz: 0b9472d3dd485bf1873b210e4f9058f1f1fd293883915e15a54890aa494717b1fa15b28d06a6f1e6fa33fbefa18b87930ff19203ff05efb31dce6332a823e2b0
|
@@ -161,7 +161,7 @@ module Fastlane
|
|
161
161
|
['project', 'Path to the project file'],
|
162
162
|
['scheme', "The project's scheme. Make sure it's marked as `Shared`"],
|
163
163
|
['platform', "Use a custom simulator destination for building the app (iOS, tvOS or watchOS)"],
|
164
|
-
['configuration', 'The configuration to use when building the app. Defaults to "
|
164
|
+
['configuration', 'The configuration to use when building the app. Defaults to "Debug"'],
|
165
165
|
['derived_data_path', 'The directory where built products and other derived data will go'],
|
166
166
|
['result_bundle_path', 'Path to the result bundle directory to create'],
|
167
167
|
['buildlog_path', 'The directory where to store the build log'],
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class WaitAndroidEmuIdle < Action
|
4
|
+
def self.run(params)
|
5
|
+
start_time = Time.now
|
6
|
+
load_threshold = 1.0
|
7
|
+
UI.important("Start waiting until device is idle (#{Time.now})")
|
8
|
+
adb_command = 'adb shell uptime | cut -d , -f 3 | cut -f 2 -d :'
|
9
|
+
load = `#{adb_command}`.strip.to_f
|
10
|
+
|
11
|
+
end_time = start_time + 1800
|
12
|
+
while load > load_threshold && Time.now < end_time
|
13
|
+
if load < 4
|
14
|
+
`adb shell dumpsys window | grep -E "mCurrentFocus.*Application Not Responding" || echo`
|
15
|
+
anr_package = `adb shell dumpsys window | grep -E "mCurrentFocus.*Application Not Responding" | cut -f 2 -d : | sed -e "s/}//" -e "s/^ *//"`.strip
|
16
|
+
unless anr_package.empty?
|
17
|
+
UI.important("ANR on screen for: #{anr_package}. Restarting it.")
|
18
|
+
begin
|
19
|
+
`adb shell su 0 killall #{anr_package}`
|
20
|
+
rescue StandardError => e
|
21
|
+
UI.error(e)
|
22
|
+
# Fallback to click if kill didn't work. This location is for a 1080x1920 screen
|
23
|
+
`adb shell input tap 540 935 || echo`
|
24
|
+
end
|
25
|
+
|
26
|
+
if anr_package == 'com.android.systemui'
|
27
|
+
`adb shell am start-service -n com.android.systemui/.SystemUIService || echo`
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
sleep(10)
|
33
|
+
load = `#{adb_command}`.strip.to_f
|
34
|
+
end
|
35
|
+
|
36
|
+
UI.important('Reached timeout before device is idle 😕') if load > load_threshold
|
37
|
+
UI.important("Waited until device is idle for #{(Time.now - start_time).to_i} seconds ⌛️")
|
38
|
+
end
|
39
|
+
|
40
|
+
#####################################################
|
41
|
+
# @!group Documentation
|
42
|
+
#####################################################
|
43
|
+
|
44
|
+
def self.description
|
45
|
+
'Adds environment variables to a test plan'
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.available_options
|
49
|
+
[]
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.supported?(_platform)
|
53
|
+
[:android].include?(platform)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-stream_actions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GetStream
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xctest_list
|
@@ -244,6 +244,7 @@ files:
|
|
244
244
|
- lib/fastlane/plugin/stream_actions/actions/testflight_build.rb
|
245
245
|
- lib/fastlane/plugin/stream_actions/actions/touch_changelog.rb
|
246
246
|
- lib/fastlane/plugin/stream_actions/actions/update_testplan.rb
|
247
|
+
- lib/fastlane/plugin/stream_actions/actions/wait_android_emu_idle.rb
|
247
248
|
- lib/fastlane/plugin/stream_actions/version.rb
|
248
249
|
homepage: https://github.com/GetStream/fastlane-plugin-stream_actions
|
249
250
|
licenses: []
|