test: add a review-tools helper for Spread tests
Metadata
Current evaluation
Adds a review helper for Spread tests to run review-tools on built snaps. Part of #6510. CI passing, awaiting first review.
Suggested action: needs review
Reason: CI is fully passing and the change is focused (test infrastructure helper for review-tools). It has no reviews yet and is only 1 day old, so it's ready for maintainer review. The author hasn't locally run `make lint && make test` (unchecked box), but CI lint checks pass.
Evaluated by: mr-cal-bot
Impact:
25
Quick Win:
14
Complexity:
20
Confidence:
75
Actionability:
70
Issue body
Adds a [`review`](https://github.com/canonical/snapcraft/pull/6531/files#diff-2dbe9a20d857eb4b506f59b1c4a7b6896ccc6ecc4058a405d44dc5634e161a3c)
helper so Spread tests can run review-tools on the snaps they build.
- `review-tools` is installed once in the project prepare and kept across task cleanup.
- `review <snap>` copies the snap to `$HOME` (review-tools is strictly confined), runs the review, and fails on any error or warning.
`review --no-fail <snap>` prints the JSON and passes, for snaps that are expected to have findings.
- The manifest tests now use `review` instead of calling review-tools directly.
- [`classic-patchelf`](https://github.com/canonical/snapcraft/pull/6531/files#diff-62f1b1923d7c70fd692001d3d88e28b785bbd0e2f5a22da2d70dd94caf351f87R50-R56) uses `--no-fail` and checks that the only finding is the expected classic-confinement error.
Other tests will be moved to `review` in follow-up PRs.
Part of #6510
---
- [x] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md).
- [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [ ] I've successfully run `make lint && make test`.
- [x] I've added or updated any relevant documentation.
- [x] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing.
- [ ] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b |
Impact:
25
Quick Win:
14
Complexity:
20
Confidence:
75
Actionability:
70
|
needs review | Adds a review helper for Spread tests to run review-tools on built snaps. Part of #6510. CI passing, awaiting first review. |
Update history
| Date | Change |
|---|---|
| updated | |
| updated | |
| updated | |
| updated | |
| created |
Related work
-
Related To:
snapcraft#6510
(confidence 95%)
This PR is part of issue #6510 which tracks running review-tools on all spread tests that build snaps.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #6510 Spread tests should run review-tools on snaps | snapcraft | open | Enhancement to add review-tools checks to Spread tests. Triaged, with active PR #6531 implementing the first part. | |
| #2235 tests: cover manifest generation with review-tools | snapcraft | merged | PR merged into master: manifest-generation spread tests extended to actually build a snap and run review-tools.snap-review on it (LP #1790026); the review-tools step survives today in tests/spread/_common/manifest-creation. | |
| #1272 tests: initial setup for the snapcraft snap tests with spread | snapcraft | merged | Merged PR #1272 as commit 545344442, adding initial Spread-based test infrastructure for the snapcraft snap. |