← Back to issue list

integration tests rely on project_dir

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1659356
Type
issue
State
closed
Author
~sergiusens
Labels
tests
Created
Updated
Closed

Current evaluation

Refactored integration tests to stop relying on project_dir; fixed by snapcore/snapcraft PR #1078 and commit 4fe0247b8.

Resolution: closed resolved

Reason: The issue was resolved by merged PR snapcore/snapcraft#1078, recorded as commit 4fe0247b8 with the message "tests: do not rely on project_dir." The tests now use shared path helpers instead of repeated project_dir setup.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When writing integration tests there is a common pattern repeated over and over: - define project_dir - run snapcraft in that project_dir (which copies project_dir, the dir, into curdir) - construct paths using project_dir Instead it would be better if - explode project_dir in curdir - run snapcraft - use paths constructed form the base test class using os.getcwd, providing self.parts_dir, self.stage_dir, self.prime_dir, self.snap_dir, ...

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Refactored integration tests to stop relying on project_dir; fixed by snapcore/snapcraft PR #1078 and commit 4fe0247b8.
stealth/space-bunny-alpha — closed resolved Integration tests were refactored to avoid repeated project_dir setup and use shared path helpers; merged in PR #1078.
stealth/space-bunny-alpha — closed resolved Merged PR #1078 removed integration tests' reliance on project_dir, building paths from the test working directory (commit 4fe0247b8).
qwen/qwen3.6-35b-a3b — — Closed without implementation. The proposed refactoring to derive test paths from the base class instead of explicitly managing project_dir was not adopted, likely abandoned or superseded by later test framework updates.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The proposal to refactor integration tests to use base class path attributes instead of manual project_dir handling was not adopted. The issue appears abandoned due to zero comments and inactivity.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The proposed integration test refactoring to use a base class for directory paths was abandoned or superseded by later test framework updates.
qwen3.6-35b-a3b-mtp-q6 — — Closed without implementation. The proposal to refactor integration tests to use base class paths instead of project_dir was abandoned. No resolution or follow-up pull request was provided.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#1078 (confidence 100%)

    The referenced pull request directly implemented the requested integration-test refactor and is associated with commit 4fe0247b8.

Related issues

Issue Project State Summary Similarity
#1078 tests: do not rely on project_dir snapcraft merged Merged PR #1078 removed tests' reliance on project_dir, resolving LP #1659356; it landed as commit 4fe0247b8.
71%
#1544792 integration test using after missing build depends snapcraft (launchpad) closed Fixed by merged snapcraft PR #320 (commit bdb768748), which made the after-test CMake project use no language so the integration test no longer requires a C++ compiler.
70%