← Back to issue list

spread tests: set appropriate default base in snapcraft.yamls

View original Github issue

Metadata

Project
snapcraft
Number
#2987
Type
pull request
State
merged
Author
cjp256
Labels
—
Created
Updated
Closed

Current evaluation

PR #2987 merged (commit feb2672d2): spread tests now rewrite the base in snapcraft.yaml to the suite's target base instead of hardcoding core18, with a clear_base() helper for legacy tests.

Resolution: closed resolved

Reason: The pull request was approved and merged into snapcraft master as commit feb2672d2 after cjp256 rebased it to resolve conflicts on 2020-04-03. It replaced per-test base values with set_base()/clear_base() in tests/spread/tools/snapcraft-yaml.sh (104 files changed, +207/-4), and the helpers remain in the tree at the current HEAD.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Instead have spread tests replace the base with appropriate target base. This way we can easily build tests without having to modify snapcraft.yaml locally. Every snap was designated as core18 by default, except: - ament is legacy, so no base added - dotnet is core16 only according to spread.yaml - all legacy tests Added clear_base() helper for legacy tests outside of /legacy/ to specifically ensure that the base is removed when run. This also populates grade and confinement in a couple cases where they weren't specified explicitly, nor set with set_confinement(). Signed-off-by: Chris Patterson <chris.patterson@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved PR #2987 merged (commit feb2672d2): spread tests now rewrite the base in snapcraft.yaml to the suite's target base instead of hardcoding core18, with a clear_base() helper for legacy tests.
stealth/space-bunny-alpha — closed resolved PR #2987 merged as commit feb2672d2: spread tests now set an appropriate default base in their snapcraft.yamls (core18 by default) with a new clear_base() helper for legacy tests, so tests build without local edits.
stealth/space-bunny-alpha — closed resolved PR #2987 merged as commit feb2672d2: spread tests now rewrite snapcraft.yaml base to the target base (core18 default), with a new clear_base() helper for legacy tests; ament legacy, dotnet core16.
stealth/space-bunny-alpha — closed resolved Merged in PR #2987 (commit feb2672d2), replacing spread-test snapcraft.yaml bases with appropriate target bases and adding clear_base() for legacy tests.
qwen/qwen3.6-35b-a3b — — Merged PR updating spread tests to automatically set appropriate default bases in snapcraft.yaml files. Adds a clear_base() helper for legacy tests and populates missing grade and confinement fields, enabling easy local test builds without manual edits.
qwen3.6-35b-a3b-mtp-q6 — — Merged after rebasing to resolve conflicts. Updates spread tests to automatically set appropriate default bases in snapcraft.yaml files, adds a clear_base() helper for legacy tests, and populates missing grade and confinement fields.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#5845 test(spread): test building base and snapd snaps snapcraft merged Merged as fb8c81e8f, adding manual Spread coverage that builds current base snaps and the snapd snap against mainline Snapcraft.
75%
#6150 docs: use core26 as the default base snapcraft merged Merged #6150 in commit 9b6d7fa9a, documenting core26 as the default base, publishing Snapcraft 9 release notes, and standardizing core/base terminology.
73%
#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.
72%
#3312 spread tests: introduce electron-builder test snapcraft merged Merged PR #3312 in commit 04f642ba9, adding an electron-builder useTemplate: false spread test with snapcraft.yaml and meta/snap.yaml comparisons.
72%
#2366 qmake plugin: add support for bases snapcraft merged Merged in snapcraft PR #2366 as commit 3585eb13d, making the qmake plugin base-aware for core16/core18 and adding spread tests; resolves Launchpad bug #1794799.
72%
#943 test(spread): test on more bases craft-application merged Merged PR #943: added an external Python runtime for testcraft and expanded Spread tests across multiple snap bases to detect base-specific bugs earlier.
72%
#1819290 Support for "base: core" snapcraft (launchpad) closed Implemented by merged snapcore/snapcraft#2499 (commit e1cc2b91c), adding 'base: core' support in snapcraft.yaml and stripping it from generated snap.yaml; Launchpad base config updated by cjwatson.
71%
#3020 spread tests: default base for local plugin tests snapcraft merged Merged #3020 as commit 24c3a40d3, setting a default base for local-plugin spread tests following commit feb2672d.
70%
#1007 fix(craft-test): enable spread tests with 26.04 backends craft-application closed Merged via canonical/snapcraft#6018, adding a temporary ubuntu-daily fallback so Spread tests could use 26.04 backends before ubuntu:26.04 images existed.
70%
#4118 init: use core22 base for `snapcraft init` snapcraft merged Merged PR #4118 (mr-cal, CRAFT-1670): snapcraft init now scaffolds core22 as the default base instead of core20, with the command moved from snapcraft_legacy/ to snapcraft/ and a spread test added. Squash-merged as 4afc9e4c9.
70%