diff --git a/localCoverage/utils.py b/localCoverage/utils.py index f6ef06e9e784d972d7eafc572ae0931b665dbe13..b440e41eea6af0e3f6f360d835739ec6707e3290 100644 --- a/localCoverage/utils.py +++ b/localCoverage/utils.py @@ -55,7 +55,7 @@ def get_product_name(root_path): :param root_path: ohos_config.json所在的目录 :return: 编译产量生成的路径 """ - ohos_config = os.path.join(root_path, "ohos_config.json") + ohos_config = os.path.join(root_path, "out", "ohos_config.json") json_obj = json_parse(ohos_config) if json_obj: product_name = json_obj["out_path"].split("out")[1].strip("/") @@ -71,7 +71,7 @@ def get_target_cpu(root_path): :param root_path: ohos_config.json所在的目录 :return: 编译产量生成的路径 """ - ohos_config = os.path.join(root_path, "ohos_config.json") + ohos_config = os.path.join(root_path, "out", "ohos_config.json") json_obj = json_parse(ohos_config) if json_obj: target_cpu = json_obj["target_cpu"] diff --git a/src/core/driver/drivers.py b/src/core/driver/drivers.py index f0c7f40426c4cacc43d10e92ff9f2538385a396d..f32ced580dc08713af71d30d50a2c3d9cf712b94 100644 --- a/src/core/driver/drivers.py +++ b/src/core/driver/drivers.py @@ -610,7 +610,7 @@ class CppTestDriver(IDriver): if coverage_outpath: strip_num = len(coverage_outpath.strip("/").split("/")) else: - ohos_config_path = os.path.join(sys.source_code_root_path, "ohos_config.json") + ohos_config_path = os.path.join(sys.source_code_root_path, "out", "ohos_config.json") with open(ohos_config_path, 'r') as json_file: json_info = json.load(json_file) out_path = json_info.get("out_path") diff --git a/src/core/utils.py b/src/core/utils.py index 7be7853f6a09a49e3a42134f46a328c7b66d7f1d..1938c140dade8b32a0afe310a4ab5b80661806e2 100755 --- a/src/core/utils.py +++ b/src/core/utils.py @@ -128,7 +128,7 @@ def scan_support_product(): def get_output_path(): # 获取输出路径 - ohos_config_path = os.path.join(sys.source_code_root_path, "ohos_config.json") + ohos_config_path = os.path.join(sys.source_code_root_path, "out", "ohos_config.json") with open(ohos_config_path, 'r') as json_file: json_info = json.load(json_file) out_name = json_info.get("out_path").split("out")[1].strip("/")