From d0a77f8a28c9a7934a26f39bf8ebd4e0d8eb8cfd Mon Sep 17 00:00:00 2001 From: Teacher_Dong Date: Fri, 20 Oct 2023 15:36:34 +0800 Subject: [PATCH] Signed-off-by:Teacher_Dong --- localCoverage/utils.py | 4 ++-- src/core/driver/drivers.py | 2 +- src/core/utils.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/localCoverage/utils.py b/localCoverage/utils.py index f6ef06e..b440e41 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 f0c7f40..f32ced5 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 7be7853..1938c14 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("/") -- Gitee