提交 ede6f5d7 编写于 作者: A alex_hold 提交者: Gitee

update src/xdevice/_core/environment/dmlib_lite.py.

Signed-off-by: <hejian3@huawei.com>
上级 6f51d52f
......@@ -61,8 +61,8 @@ def check_open_source_test(result_output):
def check_read_test_end(result=None, input_command=None):
temp_result = result.replace("\n", "")
if input_command not in temp_result:
return False
# if input_command not in temp_result:
# return False
index = result.find(input_command) + len(input_command)
result_output = result[index:]
if input_command.startswith("./"):
......@@ -87,8 +87,10 @@ def check_read_test_end(result=None, input_command=None):
error_no="00402")
raise LiteDeviceExecuteCommandError("execute file not exist",
error_no="00402")
elif input_command.startswith("zcat"):
return False
else:
if "OHOS #" in result_output or "Linux" in result_output:
if "OHOS #" in result_output or "# " in result_output:
if input_command == "reboot" or input_command == "reset":
return False
if input_command.startswith("mount"):
......@@ -187,12 +189,12 @@ class LiteHelper:
status = True
from xdevice import Scheduler
while time.time() - start_time < timeout:
data = com.readline().decode('gbk', errors='ignore')
data = PATTERN.sub('', data).replace("\r", "")
result = "{}{}".format(result, data)
if command in result or linux_end_command in result:
break
# while time.time() - start_time < timeout:
# data = com.readline().decode('gbk', errors='ignore')
# data = PATTERN.sub('', data).replace("\r", "")
# result = "{}{}".format(result, data)
# if command in result or linux_end_command in result:
# break
while time.time() - start_time < timeout:
if not Scheduler.is_execute:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册