python-audio-autotest-3.10 1.5.9__py3-none-any.whl → 1.5.10rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pyaatlibs/__init__.py CHANGED
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  import platform
3
3
 
4
- __version__ = "1.5.9"
4
+ __version__ = "1.5.10"
5
5
  __author__ = "Hao-Wei Lee"
6
6
  if platform.system() == "Windows":
7
7
  SEP = "\\"
pyaatlibs/adbutils.py CHANGED
@@ -2,6 +2,7 @@ import subprocess
2
2
  import threading
3
3
  import signal
4
4
  import re
5
+ import time
5
6
  from pyaatlibs.logger import Logger
6
7
 
7
8
  class AdbScreenRecordingThread(threading.Thread):
@@ -81,10 +82,22 @@ class Adb(object):
81
82
 
82
83
  @classmethod
83
84
  def get_devices(child, **kwargs):
84
- out, _ = child.execute(["devices"], **kwargs)
85
- devices = list(map(lambda x: x.strip(), out.splitlines()))
86
- del devices[0]
87
- devices = [x.split()[0] for x in devices if len(x) > 0 and x.split()[1] == "device"]
85
+ retry = 60
86
+ lines = []
87
+ while retry > 0:
88
+ out, _ = child.execute(["devices"], **kwargs)
89
+ lines = [l for l in map(lambda x: x.strip(), out.splitlines()) if len(l) > 0]
90
+
91
+ if len(lines) > 0 and lines[0] == "List of devices attached":
92
+ break
93
+
94
+ retry -= 1
95
+ time.sleep(1)
96
+
97
+ if retry == 0:
98
+ raise(RuntimeError("\"adb device\" might have some problems."))
99
+
100
+ devices = [l.split()[0] for l in lines if l.split()[1] == "device"]
88
101
  return devices
89
102
 
90
103
  @classmethod
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: python-audio-autotest-3.10
3
- Version: 1.5.9
3
+ Version: 1.5.10rc1
4
4
  Summary: This is a auto-testing framework of audio functions for Android devices.
5
5
  Home-page: https://github.com/HW-Lee/AudioAutoTest
6
6
  Author: Hao-Wei Lee
@@ -34,6 +34,9 @@ This is a auto-testing framework of audio functions for Android devices.
34
34
 
35
35
  ## Release Note
36
36
  ### v1.5
37
+ ### v1.5.10
38
+ - Fix Adb.get_devices() in case when adb didn't work well by retrying.
39
+
37
40
  ### v1.5.9
38
41
  - Update audioworker.apk (068bd43-python-audio-autotest-v1.5.9)
39
42
  - audioworker: voip: support customized file for VoIP downlink
@@ -1,7 +1,7 @@
1
- pyaatlibs/__init__.py,sha256=gBRpGCMSEl-RE7h6Dni6iPL0yAt6_dJ5XgZHyChwfFs,351
1
+ pyaatlibs/__init__.py,sha256=v21C6FoUhBKuI9_0H8Sdv_oWjC8gHckzJlZPCpskfeY,352
2
2
  pyaatlibs/aatapp.py,sha256=2oTnHnTCd4oIk_Nb218S3rO6nQfujxfVOLbQM1jeAhA,8742
3
3
  pyaatlibs/activitystatemachine.py,sha256=We5noxBtskgMUsdBOA34e8Rze8K-vuheuSBjL4RUo8Q,300
4
- pyaatlibs/adbutils.py,sha256=SV7N8UyC8bypNN58R63TkEu7R1ZHw-bQRedphcKHqjU,15431
4
+ pyaatlibs/adbutils.py,sha256=pQ0mQep_JN9NthSn5LWEd8G36ng6tpSKQSBGst52DQY,15741
5
5
  pyaatlibs/appinterface.py,sha256=cFy2agwnkSlO4iao9OxhImtx0M63OcoabnClHP2AQlc,4437
6
6
  pyaatlibs/argutils.py,sha256=6jOccgQlftmhUEGc3dAZ9-j0Mdg45jrhAGE-CylYjno,451
7
7
  pyaatlibs/audiofunction.py,sha256=7Lm_-dG88mK8ETRmu--vIyzXMPVPFiUbdwJmB4PQn9g,9640
@@ -18,8 +18,8 @@ pyaatlibs/apk/audiofunctionsdemo.apk,sha256=GG06POXrPOphMNsm5pD4XPfzVF8FXQ1ruupJ
18
18
  pyaatlibs/apk/audioworker.apk,sha256=ubfCnkCxU6wjH5TlE_WM7j93GMbHyRNRPa9_5rDw8tM,28947353
19
19
  pyaatlibs/tests/audioworker_test.py,sha256=oKwi7TGh3apYG1SJlTYWTbCazJZya7wOCtYiytQvea8,20977
20
20
  pyaatlibs/tests/conftest.py,sha256=Ng_ClpNsY-62bo8O0zCl702jy9AcwdteakJ1vhlOCTk,293
21
- python_audio_autotest_3.10-1.5.9.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
22
- python_audio_autotest_3.10-1.5.9.dist-info/METADATA,sha256=CdCIzgRbEF2z49nt7yiAqWkSyVqCu7nRMkjBKz3c6I4,4979
23
- python_audio_autotest_3.10-1.5.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
24
- python_audio_autotest_3.10-1.5.9.dist-info/top_level.txt,sha256=MyCr1MMMQB2sjxyhlZSJPG4Fx10ya00APmhY7r1fSoQ,10
25
- python_audio_autotest_3.10-1.5.9.dist-info/RECORD,,
21
+ python_audio_autotest_3.10-1.5.10rc1.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
22
+ python_audio_autotest_3.10-1.5.10rc1.dist-info/METADATA,sha256=jAsXNszs6OgvGfgGjePpjp6GZddAmKfpp1uCwgtnli0,5067
23
+ python_audio_autotest_3.10-1.5.10rc1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
24
+ python_audio_autotest_3.10-1.5.10rc1.dist-info/top_level.txt,sha256=MyCr1MMMQB2sjxyhlZSJPG4Fx10ya00APmhY7r1fSoQ,10
25
+ python_audio_autotest_3.10-1.5.10rc1.dist-info/RECORD,,