Kea2-python 0.1.0__tar.gz → 0.1.1__tar.gz
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.
Potentially problematic release.
This version of Kea2-python might be problematic. Click here for more details.
- {kea2_python-0.1.0 → kea2_python-0.1.1}/Kea2_python.egg-info/PKG-INFO +1 -1
- {kea2_python-0.1.0 → kea2_python-0.1.1}/PKG-INFO +1 -1
- kea2_python-0.1.1/kea2/assets/monkeyq.jar +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/fastbotManager.py +4 -3
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/keaUtils.py +4 -3
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/logWatcher.py +11 -4
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/utils.py +1 -5
- {kea2_python-0.1.0 → kea2_python-0.1.1}/pyproject.toml +1 -1
- kea2_python-0.1.0/kea2/assets/monkeyq.jar +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/Kea2_python.egg-info/SOURCES.txt +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/Kea2_python.egg-info/dependency_links.txt +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/Kea2_python.egg-info/entry_points.txt +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/Kea2_python.egg-info/requires.txt +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/Kea2_python.egg-info/top_level.txt +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/LICENSE +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/README.md +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/__init__.py +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/absDriver.py +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/adbUtils.py +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot-thirdpart.jar +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_configs/abl.strings +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_configs/awl.strings +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_configs/max.config +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_configs/max.fuzzing.strings +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_configs/max.schema.strings +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_configs/max.strings +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_configs/max.tree.pruning +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_configs/widget.block.py +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_libs/x86/libfastbot_native.so +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/framework.jar +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/quicktest.py +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/bug_report_generator.py +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/cli.py +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/kea_launcher.py +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/resultSyncer.py +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/templates/bug_report_template.html +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/u2Driver.py +0 -0
- {kea2_python-0.1.0 → kea2_python-0.1.1}/setup.cfg +0 -0
|
Binary file
|
|
@@ -23,13 +23,14 @@ class FastbotManager:
|
|
|
23
23
|
self.thread = None
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
def _activateFastbot(self
|
|
26
|
+
def _activateFastbot(self) -> threading.Thread:
|
|
27
27
|
"""
|
|
28
28
|
activate fastbot.
|
|
29
29
|
:params: options: the running setting for fastbot
|
|
30
30
|
:params: port: the listening port for script driver
|
|
31
31
|
:return: the fastbot daemon thread
|
|
32
32
|
"""
|
|
33
|
+
options = self.options
|
|
33
34
|
cur_dir = Path(__file__).parent
|
|
34
35
|
push_file(
|
|
35
36
|
Path.joinpath(cur_dir, "assets/monkeyq.jar"),
|
|
@@ -67,7 +68,7 @@ class FastbotManager:
|
|
|
67
68
|
device=options.serial
|
|
68
69
|
)
|
|
69
70
|
|
|
70
|
-
t = self._startFastbotService(
|
|
71
|
+
t = self._startFastbotService()
|
|
71
72
|
logger.info("Running Fastbot...")
|
|
72
73
|
|
|
73
74
|
return t
|
|
@@ -134,7 +135,7 @@ class FastbotManager:
|
|
|
134
135
|
return self.return_code
|
|
135
136
|
|
|
136
137
|
def start(self):
|
|
137
|
-
self.thread = self.
|
|
138
|
+
self.thread = self._activateFastbot()
|
|
138
139
|
|
|
139
140
|
def join(self):
|
|
140
141
|
if self.thread:
|
|
@@ -255,8 +255,8 @@ class KeaTestRunner(TextTestRunner):
|
|
|
255
255
|
global LOGFILE, RESFILE
|
|
256
256
|
LOGFILE = output_dir / Path(LOGFILE)
|
|
257
257
|
RESFILE = output_dir / Path(RESFILE)
|
|
258
|
-
logger.
|
|
259
|
-
logger.
|
|
258
|
+
logger.info(f"Log file: {LOGFILE}")
|
|
259
|
+
logger.info(f"Result file: {RESFILE}")
|
|
260
260
|
|
|
261
261
|
def run(self, test):
|
|
262
262
|
|
|
@@ -293,9 +293,10 @@ class KeaTestRunner(TextTestRunner):
|
|
|
293
293
|
message=r"Please use assert\w+ instead.",
|
|
294
294
|
)
|
|
295
295
|
|
|
296
|
-
log_watcher = LogWatcher(LOGFILE)
|
|
297
296
|
fb = FastbotManager(self.options, LOGFILE)
|
|
298
297
|
fb.start()
|
|
298
|
+
|
|
299
|
+
log_watcher = LogWatcher(LOGFILE)
|
|
299
300
|
|
|
300
301
|
if self.options.agent == "u2":
|
|
301
302
|
# initialize the result.json file
|
|
@@ -2,6 +2,10 @@ import re
|
|
|
2
2
|
import os
|
|
3
3
|
import threading
|
|
4
4
|
import time
|
|
5
|
+
from .utils import getLogger
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
logger = getLogger(__name__)
|
|
5
9
|
|
|
6
10
|
|
|
7
11
|
PATTERN_EXCEPTION = re.compile(r"\[Fastbot\].+Internal\serror\n([\s\S]*)")
|
|
@@ -16,7 +20,7 @@ def thread_excepthook(args):
|
|
|
16
20
|
|
|
17
21
|
class LogWatcher:
|
|
18
22
|
|
|
19
|
-
def watcher(self, poll_interval=
|
|
23
|
+
def watcher(self, poll_interval=0.5):
|
|
20
24
|
self.buffer = ""
|
|
21
25
|
self.last_pos = 0
|
|
22
26
|
|
|
@@ -28,7 +32,6 @@ class LogWatcher:
|
|
|
28
32
|
self.read_log()
|
|
29
33
|
|
|
30
34
|
def read_log(self):
|
|
31
|
-
time.sleep(0.02)
|
|
32
35
|
with open(self.log_file, 'r', encoding='utf-8') as f:
|
|
33
36
|
f.seek(self.last_pos)
|
|
34
37
|
new_data = f.read()
|
|
@@ -60,15 +63,19 @@ class LogWatcher:
|
|
|
60
63
|
, flush=True)
|
|
61
64
|
|
|
62
65
|
def __init__(self, log_file):
|
|
66
|
+
logger.info(f"Watching log: {log_file}")
|
|
63
67
|
self.log_file = log_file
|
|
64
68
|
self.end_flag = False
|
|
65
69
|
|
|
66
70
|
threading.excepthook = thread_excepthook
|
|
67
|
-
t = threading.Thread(target=self.watcher, daemon=True)
|
|
68
|
-
t.start()
|
|
71
|
+
self.t = threading.Thread(target=self.watcher, daemon=True)
|
|
72
|
+
self.t.start()
|
|
69
73
|
|
|
70
74
|
def close(self):
|
|
75
|
+
logger.info("Close: LogWatcher")
|
|
71
76
|
self.end_flag = True
|
|
77
|
+
if self.t:
|
|
78
|
+
self.t.join()
|
|
72
79
|
|
|
73
80
|
|
|
74
81
|
if __name__ == "__main__":
|
|
@@ -47,14 +47,10 @@ d = Device
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
def getProjectRoot():
|
|
50
|
-
root = Path(
|
|
50
|
+
root = Path(Path.cwd().anchor)
|
|
51
51
|
cur_dir = Path.absolute(Path(os.curdir))
|
|
52
52
|
while not os.path.isdir(cur_dir / "configs"):
|
|
53
53
|
if cur_dir == root:
|
|
54
54
|
return None
|
|
55
55
|
cur_dir = cur_dir.parent
|
|
56
56
|
return cur_dir
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_libs/arm64-v8a/libfastbot_native.so
RENAMED
|
File without changes
|
{kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_libs/armeabi-v7a/libfastbot_native.so
RENAMED
|
File without changes
|
|
File without changes
|
{kea2_python-0.1.0 → kea2_python-0.1.1}/kea2/assets/fastbot_libs/x86_64/libfastbot_native.so
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|