Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Test Xdevice
提交
c7166760
T
Test Xdevice
项目概览
OpenHarmony
/
Test Xdevice
9 个月 前同步成功
通知
6
Star
23
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Test Xdevice
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c7166760
编写于
1月 08, 2021
作者:
O
openharmony_ci
提交者:
Gitee
1月 08, 2021
浏览文件
操作
浏览文件
下载
差异文件
!1 修改ltp测试用例概率失败问题
Merge pull request !1 from alex_hold/master
上级
163d847f
21941224
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
9 deletion
+18
-9
src/xdevice/_core/driver/drivers_lite.py
src/xdevice/_core/driver/drivers_lite.py
+8
-5
src/xdevice/_core/driver/parser_lite.py
src/xdevice/_core/driver/parser_lite.py
+5
-2
src/xdevice/_core/executor/listener.py
src/xdevice/_core/executor/listener.py
+5
-2
未找到文件。
src/xdevice/_core/driver/drivers_lite.py
浏览文件 @
c7166760
...
...
@@ -739,11 +739,14 @@ class OpenSourceTestDriver(IDriver):
parser_instance
.
listeners
=
listener
parser_instances
.
append
(
parser_instance
)
self
.
handler
=
ShellHandler
(
parser_instances
)
result
,
_
,
error
=
self
.
config
.
device
.
execute_command_with_timeout
(
command
=
command
,
case_type
=
DeviceTestType
.
open_source_test
,
timeout
=
timeout
,
receiver
=
self
.
handler
)
self
.
config
.
command_result
=
"{}{}"
.
format
(
self
.
config
.
command_result
,
result
)
for
_
in
range
(
3
):
result
,
_
,
error
=
self
.
config
.
device
.
execute_command_with_timeout
(
command
=
command
,
case_type
=
DeviceTestType
.
open_source_test
,
timeout
=
timeout
,
receiver
=
self
.
handler
)
self
.
config
.
command_result
=
"{}{}"
.
format
(
self
.
config
.
command_result
,
result
)
if
"test pass"
in
result
.
lower
()
or
"tests pass"
in
result
.
lower
():
break
return
error
,
result
,
self
.
handler
def
_do_test_run
(
self
,
command
,
request
):
...
...
src/xdevice/_core/driver/parser_lite.py
浏览文件 @
c7166760
...
...
@@ -53,6 +53,7 @@ _CTEST_SETUP_TAG = "setup"
_CTEST_RUN_TAG
=
"-----------------------"
_TEST_PASSED_LOWER
=
"test pass"
_TESTS_PASSED_LOWER
=
"tests pass"
_COMPILE_PASSED
=
"compile PASSED"
_COMPILE_PARA
=
r
"(.* compile .*)"
...
...
@@ -745,7 +746,8 @@ class OpenSourceParser(IParser):
self
.
state_machine
.
trace_logs
.
extend
(
self
.
lines
)
self
.
handle_suite_started_tag
(
self
.
test_num
)
test_result
=
self
.
state_machine
.
test
(
reset
=
True
)
test_result
=
self
.
state_machine
.
test
(
reset
=
True
,
test_index
=
self
.
test_name
)
test_result
.
run_time
=
0
test_result
.
test_class
=
self
.
suite_name
test_result
.
test_name
=
self
.
test_name
...
...
@@ -756,7 +758,8 @@ class OpenSourceParser(IParser):
listener
.
__started__
(
LifeCycle
.
TestCase
,
result
)
for
line
in
self
.
lines
:
self
.
output
=
"{}{}"
.
format
(
self
.
output
,
line
)
if
_TEST_PASSED_LOWER
in
line
.
lower
():
if
_TEST_PASSED_LOWER
in
line
.
lower
()
or
\
_TESTS_PASSED_LOWER
in
line
.
lower
():
test_result
.
code
=
ResultCode
.
PASSED
.
value
for
listener
in
self
.
get_listeners
():
result
=
copy
.
copy
(
test_result
)
...
...
src/xdevice/_core/executor/listener.py
浏览文件 @
c7166760
...
...
@@ -119,10 +119,13 @@ class StateRecorder:
self
.
current_suites
.
index
=
uuid
.
uuid4
().
hex
return
self
.
current_suites
def
test
(
self
,
reset
=
False
):
def
test
(
self
,
reset
=
False
,
test_index
=
None
):
if
reset
or
not
self
.
current_test
:
self
.
current_test
=
CaseResult
()
self
.
current_test
.
index
=
uuid
.
uuid4
().
hex
if
test_index
:
self
.
current_test
.
index
=
test_index
else
:
self
.
current_test
.
index
=
uuid
.
uuid4
().
hex
return
self
.
current_test
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录