feat: add support to spread test expressions
Metadata
Current evaluation
Merged feature adding spread test expression support to the test command. Filters jobs by craft backend and CI host system. Approved by two reviewers and merged despite unreviewed commits and a failing OSV-scanner check. Fixes #748.
Suggested action: —
No scores available.
Issue body
If no arguments are passed to the `test` command, the `craft` backend
is used for testing. If the testing environment is detected as CI,
a system matching the host system is also specified.
If arguments are passed to the `test` command, they are interpreted as
Spread test expressions to match job names according to Spread rules,
including the use of `...` for globbing. If the testing environment is
detected as CI, only the tests matching the `craft` backend and the host
system are executed.
More information about spread test expressions are available in the
Spread documentation at https://github.com/canonical/spread?#selecting
Fixes #748
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you followed the guidelines for contributing?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `make lint && make test`?
- [ ] Have you added an entry to the changelog (`docs/reference/changelog.rst`)?
---
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged feature adding spread test expression support to the test command. Filters jobs by craft backend and CI host system. Approved by two reviewers and merged despite unreviewed commits and a failing OSV-scanner check. Fixes #748. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Implements spread test expression support for the test command, filtering jobs by backend and CI host system. Reworked to align expression matching with CI environments, then merged to resolve #748. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1660 feat: add test command and templates | charmcraft | merged | Merged addition of the charmcraft test command and templates. The feature invokes spread to run test suites locally and remotely using a multipass backend. Approved by two reviewers and rebased on main before integration. | |
| #16 tests: add spread support | rockcraft | merged | Merged after approval and passing CI, adding spread support to tests per CRAFT-865. | |
| #110 feat: Support overlay | imagecraft | merged | Merged to enable the overlay feature, provide a bare base, and add spread tests. Approved by two reviewers with passing CI checks. Resolves #98 and CRAFT-4269 across 18 files. | |
| #62 spread: add a "big" spread test | rockcraft | merged | Merged a reusable spread test framework to house multiple checks without repeated setup. The initial test validates bug #44 regarding directory permissions. Approved by one reviewer and passed CI checks. | |
| #3561 spread tests: store metrics against staging (CRAFT-391) | snapcraft | merged | Merged spread tests to store metrics against staging. Approved, passed CI, and added four lines without affecting coverage. | |
| #613 Execute spread testing | craft-application | closed | Implemented a service to execute spread tests for craft projects. The feature was completed and merged via pull request #694 in the canonical/craft-application repository. |