提交 9bf741d4 编写于 作者: Z zhongzhi

modify codecheck

Signed-off-by: Nzhongzhi <zhongzhi@kaihongdigi.com>
上级 8da55a25
......@@ -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",
......
......@@ -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",
......
......@@ -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:
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)
test_dict = self.get_test_dict(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
......@@ -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:
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册