From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id C73AA1FF0B2 for ; Mon, 24 Aug 2026 11:01:11 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 960802156C; Mon, 24 Aug 2026 11:01:11 +0200 (CEST) From: Lukas Wagner To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager] add `make coverage` build target Date: Mon, 24 Aug 2026 11:01:07 +0200 Message-ID: <20260824090107.238879-1-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787562038702 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.674 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: V67HCCSOY3JBYMKRWQHX3RUYUSNFUDAW X-Message-ID-Hash: V67HCCSOY3JBYMKRWQHX3RUYUSNFUDAW X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This uses the `tarpaulin` to generate a test coverage report in the './coverage' directory. Signed-off-by: Lukas Wagner --- .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