Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Test Developertest
提交
2f4b13fb
T
Test Developertest
项目概览
OpenHarmony
/
Test Developertest
大约 1 年 前同步成功
通知
2
Star
23
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Test Developertest
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2f4b13fb
编写于
6月 29, 2022
作者:
W
wanggang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
acts编译加入未指定子系统便指定测试套的处理
Signed-off-by:
N
wanggang
<
wanggang@kaihongdigi.com
>
上级
de50736d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
54 addition
and
13 deletion
+54
-13
src/core/build/build_manager.py
src/core/build/build_manager.py
+1
-0
src/core/build/build_testcases.py
src/core/build/build_testcases.py
+4
-1
src/core/command/display.py
src/core/command/display.py
+25
-10
src/core/command/run.py
src/core/command/run.py
+0
-2
src/core/driver/drivers.py
src/core/driver/drivers.py
+24
-0
未找到文件。
src/core/build/build_manager.py
浏览文件 @
2f4b13fb
...
...
@@ -170,6 +170,7 @@ class BuildManager(object):
LOG
.
info
(
"partname_list = %s"
%
str
(
param
.
partname_list
))
LOG
.
info
(
"testmodule = %s"
%
param
.
testmodule
)
LOG
.
info
(
"testsuit = %s"
%
param
.
testsuit
)
LOG
.
info
(
"testcase = %s"
%
param
.
testcase
)
LOG
.
info
(
"--------------------------------------------------"
)
LOG
.
info
(
""
)
...
...
src/core/build/build_testcases.py
浏览文件 @
2f4b13fb
...
...
@@ -209,8 +209,11 @@ class BuildTestcases(object):
acts_build_command
.
append
(
"system_size=standard"
)
if
len
(
para
.
subsystem
)
>
0
:
acts_build_command
.
append
(
BUILD_TARGET_SUBSYSTEM
%
para
.
subsystem
[
0
])
if
para
.
testsuit
!=
""
:
if
para
.
testsuit
!=
""
and
len
(
para
.
subsystem
)
>
0
:
acts_build_command
.
append
(
BUILD_TARGET_SUITE
%
para
.
testsuit
)
elif
para
.
testsuit
!=
""
and
len
(
para
.
subsystem
)
==
0
:
LOG
.
error
(
"Please specify subsystem."
)
return
if
os
.
path
.
exists
(
BUILD_FILEPATH
):
build_command
=
[
BUILD_FILEPATH
]
build_command
.
extend
(
acts_build_command
)
...
...
src/core/command/display.py
浏览文件 @
2f4b13fb
...
...
@@ -45,15 +45,16 @@ CMD_KEY_PRODUCTLIST = "productlist"
# 测试用例类型
# 1. UT
# 2. MST
# 3. ST
# 4. PERF
# 5. SEC
# 6. FUZZ
# 7. RELI
# 8. DST
# 9. BENCHMARK
# 10. ALL
# 2. ACTS
# 3. MST
# 4. ST
# 5. PERF
# 6. SEC
# 7. FUZZ
# 8. RELI
# 9. DST
# 10. BENCHMARK
# 11. ALL
CMD_KEY_TYPELIST
=
"typelist"
# 子系统名称列表
...
...
@@ -62,6 +63,9 @@ CMD_KEY_SUBSYSTEMLIST = "subsystemlist"
# 子系统下的部件名
CMD_KEY_PARTLIST
=
"partlist"
# acts子系统名称列表
CMD_KEY_SUBSYSTEMLIST_ACTS
=
"actssubsystemlist"
TOOL_VERSION_INFO
=
"""Welcome to DeveloperTest V1.0.0.
"""
...
...
@@ -264,7 +268,6 @@ def show_product_list():
else
:
print
(
"No category specified."
)
def
show_testtype_list
():
print
(
"List of currently supported test types:"
)
testtype_list
=
FrameworkConfigManager
().
get_framework_config
(
...
...
@@ -287,6 +290,16 @@ def show_subsystem_list(product_form):
for
index
,
element
in
enumerate
(
subsystem_name_list
):
print
(
" %d. %s"
%
(
index
+
1
,
element
))
def
show_acts_subsystem_list
():
print
(
"List of currently supported acts subsystem names:"
)
sub_list
=
[
'global'
,
'security'
,
'useriam'
,
'multimedia'
,
'appexecfwk'
,
'account'
,
'communication'
,
'notification'
,
'aafwk'
,
'miscservices'
,
'powermgr'
,
'startup'
,
'sensor'
,
'distributeddatamgr'
,
'update'
,
'graphic'
,
'ace'
,
'storage'
,
'distributedhardware'
,
'compileruntime'
,
'usb'
,
'multimodalinput'
,
'resourceschedule'
,
'telephony'
,
'hiviewdfx'
,
'location'
,
'settingsdata'
,
'barrierfree'
,
'customization'
]
sub_list
.
sort
()
for
index
,
element
in
enumerate
(
sub_list
):
print
(
" %d. %s"
%
(
index
+
1
,
element
.
strip
()))
# 从OpenHarmony/out/rk3568/build_configs/infos_for_testfwk.json里的subsystem_infos中subsystem_infos下获取partlist
def
show_partname_list
(
product_form
):
print
(
"List of currently supported part names:"
)
...
...
@@ -326,6 +339,8 @@ def display_show_command_info(command, product_form="phone"):
show_subsystem_list
(
product_form
)
elif
command
==
CMD_KEY_PARTLIST
:
show_partname_list
(
product_form
)
elif
command
==
CMD_KEY_SUBSYSTEMLIST_ACTS
:
show_acts_subsystem_list
()
else
:
print
(
"This command is not support."
)
...
...
src/core/command/run.py
浏览文件 @
2f4b13fb
...
...
@@ -141,8 +141,6 @@ class Run(object):
options
.
testcases_path
=
options
.
target_outpath
options
.
resource_path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
sys
.
framework_root_dir
,
".."
,
"resource"
))
print
(
options
.
testcases_path
)
print
(
options
.
resource_path
)
if
options
.
productform
.
find
(
"wifiiot"
)
!=
-
1
:
scheduler
.
update_test_type_in_source
(
".bin"
,
DeviceTestType
.
ctest_lite
)
...
...
src/core/driver/drivers.py
浏览文件 @
2f4b13fb
...
...
@@ -99,6 +99,8 @@ class DisplayOutputReceiver:
class
GTestConst
(
object
):
exec_para_filter
=
"--gtest_filter"
exec_para_level
=
"--gtest_testsize"
exec_acts_para_filter
=
"--jstest_filter"
exec_acts_para_level
=
"--jstest_testsize"
def
get_device_log_file
(
report_path
,
serial
=
None
,
log_name
=
"device_log"
):
...
...
@@ -808,6 +810,28 @@ class JSUnitTestDriver(IDriver):
_sleep_according_to_result
(
return_message
)
return
return_message
@
staticmethod
def
_get_acts_test_para
(
testcase
,
testlevel
,
testtype
,
target_test_path
,
suite_file
,
filename
):
if
"actstest"
==
testtype
[
0
]:
test_para
=
(
" --actstest_out_format=json"
" --actstest_out=%s%s.json"
)
%
(
target_test_path
,
filename
)
return
test_para
if
""
!=
testcase
and
""
==
testlevel
:
test_para
=
"%s=%s"
%
(
GTestConst
.
exec_acts_para_filter
,
testcase
)
elif
""
==
testcase
and
""
!=
testlevel
:
level_para
=
get_level_para_string
(
testlevel
)
test_para
=
"%s=%s"
%
(
GTestConst
.
exec_acts_para_level
,
level_para
)
else
:
test_para
=
""
return
test_para
@
classmethod
def
_get_json_shell_timeout
(
cls
,
json_filepath
):
test_timeout
=
300
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录