提交 2f4b13fb 编写于 作者: W wanggang

acts编译加入未指定子系统便指定测试套的处理

Signed-off-by: Nwanggang <wanggang@kaihongdigi.com>
上级 de50736d
......@@ -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("")
......
......@@ -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)
......
......@@ -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.")
......
......@@ -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)
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册