Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Test Developertest
提交
9bf741d4
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,发现更多精彩内容 >>
提交
9bf741d4
编写于
6月 24, 2022
作者:
Z
zhongzhi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify codecheck
Signed-off-by:
N
zhongzhi
<
zhongzhi@kaihongdigi.com
>
上级
8da55a25
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
23 addition
and
30 deletion
+23
-30
src/core/build/build_manager.py
src/core/build/build_manager.py
+1
-1
src/core/build/build_testcases.py
src/core/build/build_testcases.py
+1
-1
src/core/command/run.py
src/core/command/run.py
+5
-12
src/core/config/config_manager.py
src/core/config/config_manager.py
+7
-7
src/main/_init_global_config.py
src/main/_init_global_config.py
+9
-9
未找到文件。
src/core/build/build_manager.py
浏览文件 @
9bf741d4
...
...
@@ -118,7 +118,7 @@ class BuildManager(object):
LOG
.
warning
(
"No build target found."
)
return
False
# build_cfg_filepath = OpenHarmony/test/developertest/BUILD.gn
#
路径拼接
build_cfg_filepath = OpenHarmony/test/developertest/BUILD.gn
build_cfg_filepath
=
os
.
path
.
join
(
project_root_path
,
"test"
,
"developertest"
,
...
...
src/core/build/build_testcases.py
浏览文件 @
9bf741d4
...
...
@@ -73,7 +73,7 @@ class BuildTestcases(object):
testcase_outpath
=
""
# get_build_output_path = OpenHarmony/out/rk3568/build_configs/platforms_info/toolchain_to_variant.json
#
路径注释
get_build_output_path = OpenHarmony/out/rk3568/build_configs/platforms_info/toolchain_to_variant.json
toolchain_filepath
=
os
.
path
.
join
(
get_build_output_path
(
productform
),
"build_configs"
,
...
...
src/core/command/run.py
浏览文件 @
9bf741d4
...
...
@@ -41,8 +41,7 @@ LOG = platform_logger("Run")
class
Run
(
object
):
def
process_command_run
(
self
,
command
,
options
):
para
=
Parameter
()
# 过滤options中的test type参数,确保都是合法的,最终的数据结构为:
# [{unittest:300,moduletest:300}]
# 过滤options中的test type参数,确保都是合法的,最终的数据结构为:[{unittest:300,moduletest:300}]
test_type_list
=
para
.
get_testtype_list
(
options
.
testtype
)
if
len
(
test_type_list
)
==
0
:
LOG
.
error
(
"The testtype parameter is incorrect."
)
...
...
@@ -81,17 +80,11 @@ class Run(object):
LOG
.
error
(
"Build test cases failed."
)
return
# test_case_path = self.get_tests_out_path(options.productform)
# if not os.path.exists(test_case_path):
# LOG.error("%s is not exist." % test_case_path)
# return
if
"actstest"
in
options
.
testtype
:
test_dict
=
self
.
get_acts_test_dict
(
options
)
else
:
test_dict
=
self
.
get_test_dict
(
options
)
# test_dict = TestCaseManager().get_test_files(test_case_path, options)
if
not
self
.
_check_test_dictionary
(
test_dict
):
LOG
.
error
(
"The test file list is empty."
)
return
...
...
@@ -260,6 +253,6 @@ class Run(object):
if
not
os
.
path
.
exists
(
test_case_path
):
LOG
.
error
(
"%s is not exist."
%
test_case_path
)
return
# 根据测试用例目录文件的后缀名,将测试文件按照DEX、JST、PYT、CXX、BIN进行分类,存放到字典中
test_dict
=
TestCaseManager
().
get_test_files
(
test_case_path
,
options
)
return
test_dict
src/core/config/config_manager.py
浏览文件 @
9bf741d4
...
...
@@ -25,8 +25,8 @@ from core.constants import ConfigFileConst
LOG
=
platform_logger
(
"config_manager"
)
# framework_res_dir = OpenHarmony/test/developertest
# CONFIG_PATH = OpenHarmony/test/developertest/config
#
变量注释
framework_res_dir = OpenHarmony/test/developertest
#
变量注释
CONFIG_PATH = OpenHarmony/test/developertest/config
CONFIG_PATH
=
os
.
path
.
join
(
sys
.
framework_res_dir
,
"config"
)
# framework_config.xml
...
...
@@ -34,7 +34,7 @@ class FrameworkConfigManager(object):
def
__init__
(
self
,
filepath
=
""
):
if
filepath
==
""
:
# filepath = OpenHarmony/test/developertest/config/framework_config.xml
#
变量注释
filepath = OpenHarmony/test/developertest/config/framework_config.xml
self
.
filepath
=
os
.
path
.
abspath
(
os
.
path
.
join
(
CONFIG_PATH
,
ConfigFileConst
.
FRAMECONFIG_FILEPATH
))
else
:
...
...
@@ -94,7 +94,7 @@ class FilterConfigManager(object):
def
__init__
(
self
,
filepath
=
""
):
if
filepath
==
""
:
# filepath = OpenHarmony/test/developertest/config/filter_config.xml
#
变量注释
filepath = OpenHarmony/test/developertest/config/filter_config.xml
self
.
filepath
=
os
.
path
.
abspath
(
os
.
path
.
join
(
CONFIG_PATH
,
ConfigFileConst
.
FILTERCONFIG_FILEPATH
))
...
...
@@ -162,7 +162,7 @@ class UserConfigManager(object):
def
__init__
(
self
,
config_file
=
""
):
if
config_file
==
""
:
# filepath = OpenHarmony/test/developertest/config/user_config.xml
#
变量注释
filepath = OpenHarmony/test/developertest/config/user_config.xml
self
.
filepath
=
os
.
path
.
abspath
(
os
.
path
.
join
(
CONFIG_PATH
,
ConfigFileConst
.
USERCONFIG_FILEPATH
))
else
:
...
...
@@ -283,7 +283,7 @@ class BuildConfigManager(object):
def
__init__
(
self
,
filepath
=
""
):
if
filepath
==
""
:
# filepath = OpenHarmony/test/developertest/config/build_config.xml
#
变量注释
filepath = OpenHarmony/test/developertest/config/build_config.xml
self
.
filepath
=
os
.
path
.
abspath
(
os
.
path
.
join
(
CONFIG_PATH
,
ConfigFileConst
.
BUILDCONFIG_FILEPATH
))
else
:
...
...
@@ -311,7 +311,7 @@ class FuzzerConfigManager(object):
def
__init__
(
self
,
config_path
=
""
):
if
config_path
==
""
:
# filepath = OpenHarmony/test/developertest/config/fuzz_config.xml
#
变量注释
filepath = OpenHarmony/test/developertest/config/fuzz_config.xml
self
.
filepath
=
self
.
filepath
=
os
.
path
.
abspath
(
os
.
path
.
join
(
CONFIG_PATH
,
ConfigFileConst
.
FUZZCONFIG_FILEPATH
))
else
:
...
...
src/main/_init_global_config.py
浏览文件 @
9bf741d4
...
...
@@ -23,7 +23,7 @@ def _init_global_config():
# insert src path for loading xdevice modules
# 当前脚本运行的绝对路径 去掉最后两个路径
# framework_src_dir = OpenHarmony/test/developertest
#
变量注释
framework_src_dir = OpenHarmony/test/developertest
sys
.
framework_src_dir
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)))
...
...
@@ -31,11 +31,11 @@ def _init_global_config():
sys
.
path
.
insert
(
0
,
sys
.
framework_src_dir
)
# 当前脚本运行的绝对路径 去掉最后两个路径
# framework_root_dir = OpenHarmony/test/developertest
#
变量注释
framework_root_dir = OpenHarmony/test/developertest
sys
.
framework_root_dir
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
))))
# sys.xdevice_dir = OpenHarmony/test/xdevice/src
#
变量注释
sys.xdevice_dir = OpenHarmony/test/xdevice/src
sys
.
xdevice_dir
=
os
.
path
.
abspath
(
os
.
path
.
join
(
sys
.
framework_root_dir
,
".."
,
...
...
@@ -43,7 +43,7 @@ def _init_global_config():
"src"
))
sys
.
path
.
insert
(
0
,
sys
.
xdevice_dir
)
# sys.xdevice_extension_dir = OpenHarmony/xdevice/extension/src
#
变量注释
sys.xdevice_extension_dir = OpenHarmony/xdevice/extension/src
sys
.
xdevice_extension_dir
=
os
.
path
.
abspath
(
os
.
path
.
join
(
sys
.
framework_root_dir
,
".."
,
...
...
@@ -52,14 +52,14 @@ def _init_global_config():
"src"
))
sys
.
path
.
insert
(
1
,
sys
.
xdevice_extension_dir
)
# pytest_dir = OpenHarmony/test/developertest/aw/python
#
变量注释
pytest_dir = OpenHarmony/test/developertest/aw/python
sys
.
pytest_dir
=
os
.
path
.
abspath
(
os
.
path
.
join
(
sys
.
framework_root_dir
,
"aw"
,
"python"
))
sys
.
path
.
insert
(
2
,
sys
.
pytest_dir
)
# adapter_dir = OpenHarmony/test/developertest/adapter/aw/python
#
变量注释
adapter_dir = OpenHarmony/test/developertest/adapter/aw/python
sys
.
adapter_dir
=
os
.
path
.
abspath
(
os
.
path
.
join
(
sys
.
framework_root_dir
,
"adapter"
...
...
@@ -67,16 +67,16 @@ def _init_global_config():
"python"
))
sys
.
path
.
insert
(
3
,
sys
.
adapter_dir
)
# hmh_script = OpenHarmony/test/developertest/libs
#
变量注释
hmh_script = OpenHarmony/test/developertest/libs
sys
.
hmh_script
=
os
.
path
.
abspath
(
os
.
path
.
join
(
sys
.
framework_root_dir
,
"libs"
))
sys
.
path
.
insert
(
4
,
sys
.
hmh_script
)
# framework_res_dir = OpenHarmony/test/developertest
#
变量注释
framework_res_dir = OpenHarmony/test/developertest
sys
.
framework_res_dir
=
sys
.
framework_root_dir
# exec_dir = OpenHarmony/test/developertest
#
变量注释
exec_dir = OpenHarmony/test/developertest
sys
.
exec_dir
=
sys
.
framework_root_dir
from
core.common
import
get_source_code_root_path
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录