提交 3962ebd8 编写于 作者: O openharmony_ci 提交者: Gitee

!59 js用例运行aa启动失败后,停止测试继续执行

Merge pull request !59 from alex_hold/cherry-pick-1635479844
......@@ -1636,8 +1636,8 @@ class JSUnitTestDriver(IDriver):
LOG.info("The timeout is {} seconds".format(timeout))
while time.time() - self.start_time <= timeout:
result_message = ""
with open(device_log_file, "r", encoding='utf-8') \
as file_read_pipe:
with open(device_log_file, "r", encoding='utf-8',
errors='ignore') as file_read_pipe:
lines = file_read_pipe.readlines()
for line in lines:
if line.find("JSApp:") != -1:
......@@ -1684,7 +1684,8 @@ class JSUnitTestDriver(IDriver):
% (ability_name, package)
result_value = self.config.device.hdc_command(command)
if result_value and "success" in str(result_value).lower():
if result_value and "start ability successfully" in\
str(result_value).lower():
setattr(self, "start_success", True)
LOG.info("execute %s's testcase success. result value=%s"
% (package, result_value))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册