← Back to issue list

fix(test): do not create 2 snapcraft.yaml and confuse location

View original Github issue

Metadata

Project
snapcraft
Number
#4662
Type
pull request
State
merged
Author
syu-w
Labels
Created
Updated
Closed

Current evaluation

Merged a test fix preventing duplicate snapcraft.yaml creation in conflicting root and snap directories. Resolves silent overrides and ensures hooks are detected by clarifying fixture paths. Approved and merged.

Suggested action:

No scores available.

Issue body

There are 2 bugs: First, the current fixture `snapcraft_yaml` may create 2 `snapcraft.yaml` in `/` and `/snap/` due to it used in different places and it is default to `/snap/snapcraft.yaml`. When both `snapcraft.yaml` exists, the `/snapcraft.yaml` is used without any error / warning. The second bug is when `/snap/snapcraft.yaml` exists, `/build-aux/snap` will be ignored even if it had hooks in it. This is probably expected behavior since these are two different versions of the structure. Needs #4661

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged a test fix preventing duplicate snapcraft.yaml creation in conflicting root and snap directories. Resolves silent overrides and ensures hooks are detected by clarifying fixture paths. Approved and merged.
qwen3.6-35b-a3b-mtp-q6 Merged fix for a test fixture bug that created duplicate snapcraft.yaml files in / and /snap/, causing incorrect file resolution and ignored hooks. Updated with additional explanation per reviewer request.
qwen3.6-35b-a3b-mtp-q6 Merged to fix test fixtures creating duplicate snapcraft.yaml files, causing location confusion and ignoring /build-aux/snap hooks. Updated with clarifications and merged to resolve test setup issues.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1601 snapcraft.yaml: don't re-use build dir snapcraft merged Merged a fix for a source-build directory clash in snapcraft.yaml. The build directory was renamed to apt-build to avoid scriptlet conflicts. Approved by reviewers and passed CI, resolving the failure.
76%
#85 test: cleanup test now that we have a new enough snapcraft snapcraft-rocks merged Merged test cleanup after upgrading to a stable snapcraft version. Removes six lines of outdated test code. Approved by one reviewer, passed all CI checks, and successfully merged.
75%
#669 Add detection for an existing `.snapcraft.yaml` file before running `snapcraft init` snapcraft merged Merged fix preventing snapcraft init from creating a duplicate snapcraft.yaml when .snapcraft.yaml exists. A unit test was added per reviewer request before merge.
74%
#5529 fix: remove test artifact workaround snapcraft merged Merged a fix that removes the snapcraft test artifact location workaround, as craft-application 3.5 now handles this natively. Approved by two reviewers, passed all CI checks, and modified five files.
73%
#392 test: remove artifact location workaround fetch-service merged Merged following approval and passing CI. Removed a CI test workflow workaround for artifact locations, as snapcraft resolved the underlying issue. Closes #391.
73%
#4755 tests: fix devel base snap test snapcraft merged Merged a fix for the devel base snap test. The update ensures snapcraft correctly creates and utilizes the devel base. Approved by two reviewers, passed CI checks, and applied with a minimal one-file change.
73%
#2256 local source: don't include .snapcraft directory snapcraft merged Resolved LP: #1791773 by merging a change that excludes the .snapcraft directory from copying and part staleness checks. Approved, passed CI, and merged with a six-line update across two files.
73%
#5664 fix: snapcraft init crash when snapcraft.yaml exists but is empty snapcraft merged Merged a fix for a snapcraft init crash when snapcraft.yaml exists but is empty. The PR addressed review comments, added unit tests, and passed all CI checks before merging.
73%
#46 tests: add fake snapd fixture craft-parts merged Merged after two approvals and passing CI. Introduces a fake snapd fixture to test snap package handling in craft-parts.packages. Adds 212 lines across two files. Windows compatibility limitations were noted for separate follow-up.
72%
#5085 fix: allow parallel installations of signed snapcraft snaps snapcraft merged Merged a fix enabling parallel installations of signed snapcraft snaps, resolving issues #4683 and #4927. Approved by two reviewers, passed CI checks, and integrated.
72%