← 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 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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Merged. Added SNAPCRAFT_INSTALL_COMMAND env var to override snapcraft installation in tests. Fixed LXD container variable propagation failure, enabling isolated test execution 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 after two approvals. The PR updates integration tests to run against the installed snapcraft snap, aligning with user environments. Despite a reported Go runtime address space conflict in CI, the changes were accepted and merged.
72%
#1263 lxd: pass through commands into the container snapcraft merged Merged a pull request enabling snapcraft to pass build commands into LXD containers. The change allows remote builds to execute within the container environment, addressing path mounting issues during remote snap creation. Approved by one reviewer, though coverage decreased slightly.
70%