← Back to issue list

tests: allow to overwrite the snapcraft install command

View original Github issue

Metadata

Project
snapcraft
Number
#1894
Type
pull request
State
merged
Author
come-maiz
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #1894 as commit 596896be8, adding SNAPCRAFT_INSTALL_COMMAND so integration tests can override Snapcraft installation and skip the preceding build stage.

Resolution: closed resolved

Reason: The pull request was merged as commit 596896be8. The new environment variable can select commands such as installing Snapcraft from the edge channel instead of building it from source.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? ----- The snap store team wants to run only one stage. They can define their stage and the script to run through the api. However, in here we have a dependency on a previous stage, so it wouldn't be possible to call `sudo ./tools/travis/run_tests.sh snapcraft/tests/integration/store` independently. Their tests don't need to build the snapcraft snap from source, so we could just install snapcraft from edge. I am adding here an optional env var SNAPCRAFT_INSTALL_COMMAND, that the store team can send on their API request set to `sudo snap install snapcraft --edge --classic`.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #1894 as commit 596896be8, adding SNAPCRAFT_INSTALL_COMMAND so integration tests can override Snapcraft installation and skip the preceding build stage.
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#1894 (commit 596896be8), adding SNAPCRAFT_INSTALL_COMMAND so integration tests can override Snapcraft installation and skip the preceding build stage.
qwen/qwen3.6-35b-a3b — — Merged after fixing LXD container environment variable propagation. Adds the SNAPCRAFT_INSTALL_COMMAND variable, enabling the snap store team to override the default snapcraft installation step during integration tests.
qwen3.6-35b-a3b-mtp-q6 — — Merged after fixing an LXD env var propagation issue. Adds SNAPCRAFT_INSTALL_COMMAND to let the store team override the default snapcraft install command during tests without building from source.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1625 tests: use the snapcraft snap for integration tests snapcraft merged Merged PR #1625 updated integration tests to run the installed Snapcraft snap, better matching the user environment. Resolution: commit eebb070e6.
77%
#1849 tests: add snap not found tests snapcraft merged Merged missing-snap test coverage; snapcraft PR #1849 landed as commit 54cf2bd9e.
74%
#2096 tests: don't use os_release and repo from snapcraft snapcraft merged Merged PR #2096 in commit 0e27e147d, replacing integration tests' use of Snapcraft's os_release and repo modules with test-specific helpers; it fixes #1982.
72%
#2295 tests: use SNAPCRAFT_PACKAGE_TYPE everywhere snapcraft merged PR #2295 merged as commit ffbad69ea: unit tests now use SNAPCRAFT_PACKAGE_TYPE instead of legacy SNAPCRAFT_FROM_* env vars, and unused container tests were removed to ease migration to spread. (LP: #1794379)
72%
#73 tests: add stage snaps integration test (CRAFT-68) craft-parts merged Merged PR #73 via commit a5dbc53e (merge 978aeac1), adding an integration test that verifies stage snaps are unpacked into the part install directory.
72%
#2103 package: make use of snapcraftctl snapcraft features snapcraft merged Merged in #2103 as commit 60d505347 and shipped in 2.42, replacing prepare/build/install hooks with override-pull/override-build.
72%
#3609 tests: move legacy snapcraft tests (CRAFT-728) snapcraft merged Merged PR #3609 in commit a71aeff54, moving snapcraft_legacy unit tests from tests/unit to tests/legacy to match the package rename.
71%
#2283 snapcraft snap: refactor override-build into a script snapcraft merged PR #2283 merged as commit f9592939a, moving the Snapcraft snap's override-build logic into a script to reduce snapcraft.yaml duplication ahead of self-vendoring.
71%
#2353 tests: remove dependency on snapcraft for integration tests snapcraft merged PR #2353 by sergiusens merged as commit 6a7c860c4, dropping snapcraft imports from integration tests (27 files, +956/-733) so the suite no longer depends on snapcraft and tests stay independent, alongside the bases/multipass cleanup.
70%