summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--zephyr/README.md14
2 files changed, 15 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index aacb38ac3a..db195ffc98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,7 @@ cscope.*
__pycache__
*.egg-info
.hypothesis/
+zephyr/zmake/.coverage
# Clangd language server
.cache/clangd/index/*
diff --git a/zephyr/README.md b/zephyr/README.md
index 07645fa177..e23aa15a82 100644
--- a/zephyr/README.md
+++ b/zephyr/README.md
@@ -59,3 +59,17 @@ report, but not in the chroot, as some pip modules are missing there.
The [latest coverage report](https://gitlab.com/zephyr-ec/ec/-/jobs/artifacts/main/file/zephyr/zmake/htmlcov/index.html?job=zmake_coverage
) is on gitlab.
+
+You can run the coverage report outside of the chroot easily:
+
+```
+# Install test dependencies
+cd ~/chromiumos/src/platform/ec
+python3 -m pip install 'zephyr/zmake[tests]' --user
+# Run tests with coverage
+cd ~/chromiumos/src/platform/ec/zephyr/zmake
+coverage run --source=zmake -m pytest .
+coverage report
+coverage html
+xdg-open htmlcov/index.html
+```