diff --git a/src/core/build/build_manager.py b/src/core/build/build_manager.py index 735fd336c53cab7d7a66db9cd3808368a0f952ee..00bce4923eeff7d8028bf62bd7819f7d08878c20 100755 --- a/src/core/build/build_manager.py +++ b/src/core/build/build_manager.py @@ -19,7 +19,7 @@ import os from xdevice import platform_logger from core.utils import scan_support_product -from core.config.config_manager import UserConfigManager +from core.config.config_manager import UserConfigManager, FrameworkConfigManager from core.build.select_targets import SelectTargets from core.build.pretreat_targets import PretreatTargets from core.build.build_testcases import BuildTestcases @@ -91,6 +91,9 @@ class BuildManager(object): def _compile_testcases(self, project_root_path, para): # 获取所有支持的产品,3.1Release版本为["DAYU","Hi3516DV300","ohos-arm64","ohos-sdk","rk3568"] all_product_list = scan_support_product() + product_list = FrameworkConfigManager().get_framework_config("productform") + if para.productform in product_list and para.productform.find("wifiiot") == -1: + all_product_list.append(para.productform) if para.productform not in all_product_list: from core.build.build_lite_manager import BuildLiteManager build_lite_manager = BuildLiteManager(project_root_path) diff --git a/src/core/build/build_testcases.py b/src/core/build/build_testcases.py index 003cf0f38701dd8254784aeabbe34699a50e6da1..db2e7a70f8ef5b432be0feec9b031186fe1f60ef 100755 --- a/src/core/build/build_testcases.py +++ b/src/core/build/build_testcases.py @@ -251,10 +251,10 @@ class BuildTestcases(object): command.append("build_example=true") command.append("--build-target") command.append(target) - command.append("--gn-args") target_cpu = self.build_parameter_dic.get("target_cpu") if target_cpu == "arm64": if productform == "m40": + command.append("--gn-args") command.append("use_musl=false") command.append("--gn-args") command.append("use_custom_libcxx=true") diff --git a/src/core/command/run.py b/src/core/command/run.py index f79147554306177257fe37f42f3de6554a6295fc..9ea7e827bb6fe8fa4cdcd7e4b0e66a7de6e9b89f 100755 --- a/src/core/command/run.py +++ b/src/core/command/run.py @@ -225,7 +225,7 @@ class Run(object): "tests")) else: testcase_path = os.path.join( - get_build_output_path(product_form), "test") + get_build_output_path(product_form), "tests") LOG.info("testcase_path=%s" % testcase_path) return testcase_path diff --git a/src/core/utils.py b/src/core/utils.py index b45661d39dbc211d241117c6321592d1b6d230c4..9adb06977d7264870d23f66f784a5abccfd31b4d 100755 --- a/src/core/utils.py +++ b/src/core/utils.py @@ -21,7 +21,7 @@ import os import platform import time import json -from core.config.config_manager import UserConfigManager +from core.config.config_manager import UserConfigManager, FrameworkConfigManager def get_filename_extension(file): @@ -78,12 +78,15 @@ def get_build_output_path(product_form): return "" standard_large_system_list = scan_support_product() + product_list = FrameworkConfigManager().get_framework_config("productform") if product_form in standard_large_system_list: device_name = parse_device_name(product_form) if device_name is not None: build_output_name = device_name else: return "" + elif product_form in product_list and (product_form not in standard_large_system_list): + build_output_name = product_form else: board_info_list = product_form.split("_") if len(board_info_list) < 3: @@ -193,4 +196,8 @@ def is_lite_product(product_form, code_root_path): if code_root_path is None or code_root_path == "": return True if len(product_form.split("_")) >= 3 else False else: - return True if product_form not in scan_support_product() else False + product_list = FrameworkConfigManager().get_framework_config("productform") + if (product_form in scan_support_product() or product_form in product_list) and product_form.find("wifiiot") == -1: + return False + else: + return True diff --git a/src/main/_init_global_config.py b/src/main/_init_global_config.py index 74c40eda5b058b64b6d9df8413e0f140b4d011ae..f015e098f8c3bc28f07db976b99f44101a46837c 100755 --- a/src/main/_init_global_config.py +++ b/src/main/_init_global_config.py @@ -106,10 +106,6 @@ def _iter_module_plugins(packages): def _load_internal_plugins(): - import core.driver - import benchmark.report.benchmark_reporter - _iter_module_plugins([core.driver, benchmark.report.benchmark_reporter]) - try: import ohos.environment _iter_module_plugins([ohos.environment]) @@ -119,6 +115,12 @@ def _load_internal_plugins(): _iter_module_plugins([ohos.managers]) import ohos.parser _iter_module_plugins([ohos.parser]) + import ohos.drivers + _iter_module_plugins([ohos.drivers]) + + import core.driver + import benchmark.report.benchmark_reporter + _iter_module_plugins([core.driver, benchmark.report.benchmark_reporter]) except (ModuleNotFoundError, ImportError): pass @@ -129,6 +131,7 @@ def _load_internal_plugins(): except (ModuleNotFoundError, ImportError): pass + _init_global_config() del _init_global_config