fastlane-plugin-stream_actions 0.3.13 → 0.3.14
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: e590801a23665170ef777a8f2edc02fdd1a906e389c746cf2d38e38a83fdd549
|
4
|
+
data.tar.gz: 423cd6c7cdd6d1332abf73db5742958a0e8ed96b567ac876ec82e0a5817c44e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cadaaea43caa84ffade2b7588e853ab97972c61f0ed33f2ee21707ef34585f008db02b09c0954e5928f7a2bc2b9a8c3af9a31df84e77a60aebada42aef78f5c
|
7
|
+
data.tar.gz: f35416b73c287ae215a8f3f3e34738aa5ddcb299abc1a776b1a8c92a1a78c8119a49ca7860cc992749880330d159f19b64dbfe0c09f8cdd615e6b8d19ba0f92c
|
@@ -3,37 +3,25 @@ module Fastlane
|
|
3
3
|
class WaitAndroidEmuIdleAction < Action
|
4
4
|
def self.run(params)
|
5
5
|
start_time = Time.now
|
6
|
-
load_threshold = 1.0
|
7
6
|
UI.important("Start waiting until device is idle (#{Time.now})")
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
end_time = start_time +
|
12
|
-
while
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
7
|
+
check_emu_uptime = 'adb shell uptime | cut -d , -f 3 | cut -f 2 -d :'
|
8
|
+
current_load_value = `#{check_emu_uptime}`.strip.to_f
|
9
|
+
|
10
|
+
end_time = start_time + params[:timeout]
|
11
|
+
while current_load_value > params[:load_threshold] && Time.now < end_time
|
12
|
+
not_responding_package = `adb shell dumpsys window | grep -E "mCurrentFocus.*Application Not Responding" | cut -f 2 -d : | sed -e "s/}//" -e "s/^ *//"`.strip
|
13
|
+
if not_responding_package == 'com.android.systemui'
|
14
|
+
UI.important("Trying to dismiss not responding #{not_responding_package} dialog")
|
15
|
+
`adb shell input keyevent KEYCODE_ENTER`
|
16
|
+
`adb shell input keyevent KEYCODE_DPAD_DOWN`
|
17
|
+
`adb shell input keyevent KEYCODE_ENTER`
|
30
18
|
end
|
31
19
|
|
32
20
|
sleep(10)
|
33
|
-
|
21
|
+
current_load_value = `#{check_emu_uptime}`.strip.to_f
|
34
22
|
end
|
35
23
|
|
36
|
-
UI.important('Reached timeout before device is idle 😕') if
|
24
|
+
UI.important('Reached timeout before device is idle 😕') if current_load_value > params[:load_threshold]
|
37
25
|
UI.important("Waited until device is idle for #{(Time.now - start_time).to_i} seconds ⌛️")
|
38
26
|
end
|
39
27
|
|
@@ -46,7 +34,20 @@ module Fastlane
|
|
46
34
|
end
|
47
35
|
|
48
36
|
def self.available_options
|
49
|
-
[
|
37
|
+
[
|
38
|
+
FastlaneCore::ConfigItem.new(
|
39
|
+
key: :load_threshold,
|
40
|
+
description: 'Load threshold to consider device idle',
|
41
|
+
is_string: false,
|
42
|
+
default_value: 1.0
|
43
|
+
),
|
44
|
+
FastlaneCore::ConfigItem.new(
|
45
|
+
key: :timeout,
|
46
|
+
description: 'Timeout in seconds to wait for device to be idle',
|
47
|
+
is_string: false,
|
48
|
+
default_value: 1000
|
49
|
+
)
|
50
|
+
]
|
50
51
|
end
|
51
52
|
|
52
53
|
def self.supported?(_platform)
|
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.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GetStream
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xctest_list
|