diff --git a/src/core/build/build_manager.py b/src/core/build/build_manager.py index dc0c6b4815135fc98da4a34925a0600e540c8b8a..b0cf72d8e8fbeafcfa863859eee13c2c1c009300 100755 --- a/src/core/build/build_manager.py +++ b/src/core/build/build_manager.py @@ -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("") diff --git a/src/core/build/build_testcases.py b/src/core/build/build_testcases.py index d3e8730d678dd213223e087128b4e2078e841bf0..a71b8f73eef4d7b3dc08805c9e68690022fd8b15 100755 --- a/src/core/build/build_testcases.py +++ b/src/core/build/build_testcases.py @@ -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) diff --git a/src/core/command/display.py b/src/core/command/display.py index e867c0afe1550c31414b2cffdd05db51bb71cb51..99e950e3a2dac7e644a217866164b8e747d7f1e3 100755 --- a/src/core/command/display.py +++ b/src/core/command/display.py @@ -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.") diff --git a/src/core/command/run.py b/src/core/command/run.py index f662c012f3ed67a8a6de0cc5a249b443beeb671b..4ed923e6f41960c71506710c6d153beb5d30f3eb 100755 --- a/src/core/command/run.py +++ b/src/core/command/run.py @@ -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) diff --git a/src/core/driver/drivers.py b/src/core/driver/drivers.py index 791b97f826813777224a788493263110e38f20a6..2b76afd486b7af943aaf7349423a11196a7d5a03 100755 --- a/src/core/driver/drivers.py +++ b/src/core/driver/drivers.py @@ -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