← Back to issue list

tests: mock dependency loading for patch elf test

View original Github issue

Metadata

Project
snapcraft
Number
#4075
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

PR #4075 was merged, mocking dependency loading in a lifecycle patch-ELF test to remove host-dependent ldd behavior and core22-snap requirements.

Resolution: closed resolved

Reason: Merged PR snapcore/snapcraft#4075 resolved the test-isolation problem and landed as commit a6bb3bf1b; PR head was 84b3ca8.

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] Have you successfully run `make lint`? - [X] Have you successfully run `pytest tests/unit`? ----- One of the lifecycle unit tests was not properly mocked. The test was loading dependencies for `/bin/true`, which is a process that is dependent on the host's copy of `ldd` and whether the `core22` snap is installed on the host.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved PR #4075 was merged, mocking dependency loading in a lifecycle patch-ELF test to remove host-dependent ldd behavior and core22-snap requirements.
stealth/space-bunny-alpha — closed resolved Merged #4075 (84b3ca8), mocking dependency loading in a lifecycle patch ELF test to remove host-dependent ldd behavior and core22-snap requirements.
stealth/space-bunny-alpha — closed resolved Merged PR #4075 (a6bb3bf1b), mocking dependency loading in the patch-elf lifecycle test to remove host dependence on ldd and the core22 snap.
stealth/space-bunny-alpha — closed resolved Merged #4075 (commit a6bb3bf1), mocking dependency loading in the patch-elf lifecycle unit test to prevent host /bin/true and core22 dependencies from affecting results.
qwen/qwen3.6-35b-a3b — — Merged a fix for a lifecycle unit test incorrectly loading host dependencies for /bin/true during patch elf testing. The change properly mocks dependency loading, passed CI, and added four lines of code.
qwen3.6-35b-a3b-mtp-q6 — — Merged into main. Fixed a unit test by properly mocking dependency loading for the patchelf test, removing host-dependent ldd and core22 snap requirements. Achieved 100% diff coverage.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1888 elf: make patchelf a dependency snapcraft merged Merged PR #1888 via commit 7c947f5ec, moving Patchelf out of project_loader build tools and into the deb and snap delivery mechanisms.
72%
#5135 fix(test): add patchelf to dev dependencies for testing snapcraft closed Closed unmerged as obsolete after #5225 superseded the proposed patchelf test dependency; the Starflow migration merged in commit 7a1a94e46.
72%