aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshiu <shiu@google.com>2021-10-30 07:05:53 +0000
committershiu <shiu@google.com>2021-10-31 07:14:47 +0000
commit7c7513a9bc7959bb7d68b345a1c72287c407efc2 (patch)
treeeebaea2fde68a810ecab1f94c750987427f897a5
parent6a79e74157d17099ab567398c144a79b07444f99 (diff)
downloadbt-7c7513a9bc7959bb7d68b345a1c72287c407efc2.tar.gz
Set the coverage data (.profdata, .json, .txt) to be aggregated in
mobly/logs/* to allow aggregation across test runs (as is executed for GD-cert presubmit). Test: cert/run Bug: 204611901 Change-Id: I39f1fd55a941691a47fa9ef21c443c869e7729d8
-rw-r--r--gd/cert/gd_device_lib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gd/cert/gd_device_lib.py b/gd/cert/gd_device_lib.py
index a34c0e12c..f21d9401c 100644
--- a/gd/cert/gd_device_lib.py
+++ b/gd/cert/gd_device_lib.py
@@ -243,7 +243,7 @@ class GdDeviceBaseCore(ABC):
def get_coverage_profdata_path_for_host(test_runner_base_path, type_identifier, label) -> pathlib.Path:
- return pathlib.Path(test_runner_base_path).parent.joinpath(
+ return pathlib.Path(test_runner_base_path).parent.parent.joinpath(
"%s_%s_backing_process_coverage.profdata" % (type_identifier, label))
@@ -294,7 +294,7 @@ def generate_coverage_report_for_host(coverage_info):
logging.info("[%s] Skip coverage report as llvm-cov is not found at %s" % (label, str(llvm_cov)))
return
logging.info("[%s] Generating coverage report in JSON" % label)
- coverage_result_path = pathlib.Path(test_runner_base_path).parent.joinpath(
+ coverage_result_path = pathlib.Path(test_runner_base_path).parent.parent.joinpath(
"%s_%s_backing_process_coverage.json" % (type_identifier, label))
with coverage_result_path.open("w") as coverage_result_file:
llvm_cov_export_cmd = [
@@ -310,7 +310,7 @@ def generate_coverage_report_for_host(coverage_info):
coverage_result_path.unlink(missing_ok=True)
return
logging.info("[%s] Generating coverage summary in text" % label)
- coverage_summary_path = pathlib.Path(test_runner_base_path).parent.joinpath(
+ coverage_summary_path = pathlib.Path(test_runner_base_path).parent.parent.joinpath(
"%s_%s_backing_process_coverage_summary.txt" % (type_identifier, label))
with coverage_summary_path.open("w") as coverage_summary_file:
llvm_cov_report_cmd = [