summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2021-09-02 11:26:15 -0600
committerCommit Bot <commit-bot@chromium.org>2021-09-03 15:47:54 +0000
commit5d10d9e0638216f4b298509f26bcef85fcd44eb7 (patch)
tree358b38ad25a38ec83be215037e3482de4af804d0
parentcab1ac319919cd816b70d844fc6d8e479e989e61 (diff)
downloadchrome-ec-5d10d9e0638216f4b298509f26bcef85fcd44eb7.tar.gz
zmake: Use module_paths instead of checkout
The coverage report removes the chroot prefix from the paths, but we need to use the module_paths instead of checkout so it will work on gitlab. BUG=None TEST=Pushed to gitlab coverage branch BRANCH=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I0ff47d71f95deae55714988f69d710ba95b71e6f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3139095 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--zephyr/zmake/zmake/zmake.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py
index 2559a16c45..60d001ffc6 100644
--- a/zephyr/zmake/zmake/zmake.py
+++ b/zephyr/zmake/zmake/zmake.py
@@ -717,6 +717,9 @@ class Zmake:
if proc.wait():
raise OSError(get_process_failure_msg(proc))
+ # Find the common root dir
+ prefixdir = os.path.commonprefix(list(self.module_paths.values()))
+
# Merge into a nice html report
self.logger.info("Creating coverage report %s.", build_dir / "coverage_rpt")
proc = self.jobserver.popen(
@@ -728,7 +731,7 @@ class Zmake:
"-t",
"Zephyr EC Unittest",
"-p",
- self.checkout / "src",
+ prefixdir,
"-s",
]
+ all_lcov_files,