Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Test Xdevice
提交
c11bf444
T
Test Xdevice
项目概览
OpenHarmony
/
Test Xdevice
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
c11bf444
编写于
9月 29, 2021
作者:
O
openharmony_ci
提交者:
Gitee
9月 29, 2021
浏览文件
操作
浏览文件
下载
差异文件
!45 codex issue fix
Merge pull request !45 from alex_hold/master
上级
e75ae5e7
4afde2e0
变更
3
展开全部
显示空白变更内容
内联
并排
Showing
3 changed file
with
3 addition
and
503 deletion
+3
-503
extension/src/xdevice_extension/_core/constants.py
extension/src/xdevice_extension/_core/constants.py
+0
-4
extension/src/xdevice_extension/_core/driver/drivers.py
extension/src/xdevice_extension/_core/driver/drivers.py
+1
-441
extension/src/xdevice_extension/_core/testkit/kit.py
extension/src/xdevice_extension/_core/testkit/kit.py
+2
-58
未找到文件。
extension/src/xdevice_extension/_core/constants.py
浏览文件 @
c11bf444
...
...
@@ -127,8 +127,6 @@ class DeviceTestType(object):
DeviceTestType enumeration
"""
cpp_test
=
"CppTest"
dex_test
=
"DexTest"
dex_junit_test
=
"DexJUnitTest"
hap_test
=
"HapTest"
junit_test
=
"JUnitTest"
jsunit_test
=
"JSUnitTest"
...
...
@@ -158,10 +156,8 @@ class HostDrivenTestType(object):
TEST_DRIVER_SET
=
{
DeviceTestType
.
cpp_test
,
DeviceTestType
.
dex_test
,
DeviceTestType
.
hap_test
,
DeviceTestType
.
junit_test
,
DeviceTestType
.
dex_junit_test
,
DeviceTestType
.
jsunit_test
,
DeviceTestType
.
cpp_test_lite
,
DeviceTestType
.
ctest_lite
,
...
...
extension/src/xdevice_extension/_core/driver/drivers.py
浏览文件 @
c11bf444
此差异已折叠。
点击以展开。
extension/src/xdevice_extension/_core/testkit/kit.py
浏览文件 @
c11bf444
...
...
@@ -48,7 +48,7 @@ from xdevice_extension._core.utils import convert_serial
__all__
=
[
"STSKit"
,
"PushKit"
,
"PropertyCheckKit"
,
"ShellKit"
,
"WifiKit"
,
"ConfigKit"
,
"AppInstallKit"
,
"junit_para_parse"
,
"gtest_para_parse"
,
"
junit_dex_para_parse"
,
"
reset_junit_para"
]
"gtest_para_parse"
,
"reset_junit_para"
]
LOG
=
platform_logger
(
"Kit"
)
...
...
@@ -648,7 +648,7 @@ class AppInstallKit(ITestKit):
def
remount
(
device
):
cmd
=
"
target mount
"
\
cmd
=
"
mount -o rw,remount /
"
\
if
device
.
usb_type
==
DeviceConnectorType
.
hdc
else
"remount"
device
.
hdc_command
(
cmd
)
...
...
@@ -753,62 +753,6 @@ def junit_para_parse(device, junit_paras, prefix_char="-e"):
return
" "
.
join
(
ret_str
)
def
junit_dex_para_parse
(
device
,
junit_paras
,
prefix_char
=
"--"
):
"""To parse the para of junit
Args:
device: the device running
junit_paras: the para dict of junit
prefix_char: the prefix char of parsed cmd
Returns:
the new para using in a command like -e testFile xxx
-e coverage true...
"""
ret_str
=
[]
path
=
"/%s/%s/%s/%s"
%
(
"data"
,
"local"
,
"tmp"
,
"ajur"
)
include_file
=
"%s/%s"
%
(
path
,
"includes.txt"
)
exclude_file
=
"%s/%s"
%
(
path
,
"excludes.txt"
)
if
not
isinstance
(
junit_paras
,
dict
):
LOG
.
warning
(
"The para of junit is not the dict format as required"
)
return
""
# Disable screen keyguard
disable_key_guard
=
junit_paras
.
get
(
'disable-keyguard'
)
if
not
disable_key_guard
or
disable_key_guard
[
0
].
lower
()
!=
'false'
:
from
xdevice_extension._core.driver.drivers
import
disable_keyguard
disable_keyguard
(
device
)
for
para_name
in
junit_paras
.
keys
():
path
=
"/%s/%s/%s/%s/"
%
(
"data"
,
"local"
,
"tmp"
,
"ajur"
)
if
para_name
.
strip
()
==
'test-file-include-filter'
:
for
file_name
in
junit_paras
[
para_name
]:
device
.
push_file
(
file_name
,
include_file
)
device
.
execute_shell_command
(
'chown -R shell:shell %s'
%
path
)
ret_str
.
append
(
prefix_char
+
" "
.
join
([
'testFile'
,
include_file
]))
elif
para_name
.
strip
()
==
"test-file-exclude-filter"
:
for
file_name
in
junit_paras
[
para_name
]:
device
.
push_file
(
file_name
,
include_file
)
device
.
execute_shell_command
(
'chown -R shell:shell %s'
%
path
)
ret_str
.
append
(
prefix_char
+
" "
.
join
([
'notTestFile'
,
exclude_file
]))
elif
para_name
.
strip
()
==
"test"
or
para_name
.
strip
()
==
"class"
:
result
=
_get_class
(
junit_paras
,
prefix_char
,
para_name
.
strip
())
ret_str
.
append
(
result
)
elif
para_name
.
strip
()
==
"include-annotation"
:
ret_str
.
append
(
prefix_char
+
" "
.
join
(
[
'annotation'
,
","
.
join
(
junit_paras
[
para_name
])]))
elif
para_name
.
strip
()
==
"exclude-annotation"
:
ret_str
.
append
(
prefix_char
+
" "
.
join
(
[
'notAnnotation'
,
","
.
join
(
junit_paras
[
para_name
])]))
else
:
ret_str
.
append
(
prefix_char
+
" "
.
join
(
[
para_name
,
","
.
join
(
junit_paras
[
para_name
])]))
return
" "
.
join
(
ret_str
)
def
timeout_callback
(
proc
):
try
:
LOG
.
error
(
"Error: execute command timeout."
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录