all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager] add `make coverage` build target
Date: Mon, 24 Aug 2026 11:01:07 +0200	[thread overview]
Message-ID: <20260824090107.238879-1-l.wagner@proxmox.com> (raw)

This uses the `tarpaulin` to generate a test coverage report in the
'./coverage' directory.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 .gitignore     |  2 ++
 Makefile       |  7 +++++++
 tarpaulin.toml | 22 ++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 100644 tarpaulin.toml

diff --git a/.gitignore b/.gitignore
index eb4a27ea..8de2bdad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,5 @@
 /ui/target
 Cargo.lock
 proxmox-datacenter-manager-[0-9].*/
+
+/coverage
diff --git a/Makefile b/Makefile
index 537e6faa..685170d0 100644
--- a/Makefile
+++ b/Makefile
@@ -148,6 +148,7 @@ upload-ui:
 distclean: clean
 clean: clean-deb
 	$(CARGO) clean
+	rm -rf ./coverage
 	$(MAKE) -C docs clean
 	$(MAKE) -C $(COMPLETION_DIR) clean
 	$(MAKE) -C $(UI_DIR) clean
@@ -179,3 +180,9 @@ tidy:
 	$(CARGO) fmt
 	$(MAKE) -C $(UI_DIR) tidy
 
+
+.PHONY: coverage
+coverage:
+	$(CARGO) tarpaulin 
+
+	@echo "\nCoverage report in ./coverage/tarpaulin-report.html"
diff --git a/tarpaulin.toml b/tarpaulin.toml
new file mode 100644
index 00000000..01740418
--- /dev/null
+++ b/tarpaulin.toml
@@ -0,0 +1,22 @@
+[test_config]
+
+# Skip the clean step and proceed without cleaning the target directory.
+skip-clean = true
+
+# Count hits for coverage, useful for more detailed reporting.
+count = true
+
+# List of file paths to exclude from testing.
+exclude-files = [
+    "proxmox-datacenter-manager*",
+    "ui/*"
+]
+
+# Specify the engine to use for collecting coverage (default: "trace").
+engine = "Llvm"
+
+[report]
+# Directory to output coverage files and reports.
+output-dir = "./coverage"
+
+out = ["Html"]
-- 
2.47.3





             reply	other threads:[~2026-08-24  9:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24  9:01 Lukas Wagner [this message]
2026-08-25  6:40 ` [PATCH datacenter-manager] add `make coverage` build target Lukas Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260824090107.238879-1-l.wagner@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=pdm-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal