[PR #2599] [MERGED] Coverage improvements #3173

Closed
opened 2026-03-16 11:29:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2599
Author: @divergentdave
Created: 11/21/2024
Status: Merged
Merged: 11/22/2024
Merged by: @djc

Base: mainHead: david/coverage-improvements


📝 Commits (4)

  • 840a4f8 Remove unnecessary compilation in coverage recipe
  • 53869c6 Move coverage reports to separate output directory
  • 8a45588 Avoid rebuilding dependencies across coverage runs
  • 671db52 Pass --doctests to cargo llvm-cov report too

📊 Changes

3 files changed (+10 additions, -7 deletions)

View changed files

📝 .github/workflows/test.yml (+1 -1)
📝 .gitignore (+3 -0)
📝 justfile (+6 -6)

📄 Description

This makes some further improvements to the code coverage recipes.

  • Skip a cargo +nightly build. This does not use the same RUSTFLAGS as cargo llvm-cov, let alone the same target directory, so it doesn't help with subsequent compilations.
  • Reports are moved to a separate output directory. I used /coverage, because this is a common convention in other repositories and coverage-related tools.
  • Run cargo llvm-cov clean --workspace, as recommended in the cargo-llvm-cov README, instead of cargo llvm-cov clean. This avoids removing the entire target directory, and instead deletes .profraw files, intermediate compilation artifacts for workspace crates, and executables. The README says this deletes "artifacts that may affect the coverage results". This speeds up successive coverage runs.
  • Pass --doctests when creating reports, in addition to when running tests.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/2599 **Author:** [@divergentdave](https://github.com/divergentdave) **Created:** 11/21/2024 **Status:** ✅ Merged **Merged:** 11/22/2024 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `david/coverage-improvements` --- ### 📝 Commits (4) - [`840a4f8`](https://github.com/hickory-dns/hickory-dns/commit/840a4f89c389978622a4b1dd422540313d517fbf) Remove unnecessary compilation in coverage recipe - [`53869c6`](https://github.com/hickory-dns/hickory-dns/commit/53869c69fdf28a5f295415fa4d16d7298d3a1a72) Move coverage reports to separate output directory - [`8a45588`](https://github.com/hickory-dns/hickory-dns/commit/8a455883b07ffd417b058e5f53694a28960346b7) Avoid rebuilding dependencies across coverage runs - [`671db52`](https://github.com/hickory-dns/hickory-dns/commit/671db523c61746ab913593c60d9dc7412bcd6b98) Pass --doctests to cargo llvm-cov report too ### 📊 Changes **3 files changed** (+10 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test.yml` (+1 -1) 📝 `.gitignore` (+3 -0) 📝 `justfile` (+6 -6) </details> ### 📄 Description This makes some further improvements to the code coverage recipes. * Skip a `cargo +nightly build`. This does not use the same RUSTFLAGS as `cargo llvm-cov`, let alone the same target directory, so it doesn't help with subsequent compilations. * Reports are moved to a separate output directory. I used `/coverage`, because this is a common convention in other repositories and coverage-related tools. * Run `cargo llvm-cov clean --workspace`, as recommended in the cargo-llvm-cov README, instead of `cargo llvm-cov clean`. This avoids removing the entire target directory, and instead deletes `.profraw` files, intermediate compilation artifacts for workspace crates, and executables. The README says this deletes "artifacts that may affect the coverage results". This speeds up successive coverage runs. * Pass `--doctests` when creating reports, in addition to when running tests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:29:15 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#3173
No description provided.