← Back to issue list

test: add integration tests for make plugin

View original Github issue

Metadata

Project
craft-parts
Number
#1387
Type
pull request
State
merged
Author
Copilot
Labels
—
Created
Updated
Closed

Current evaluation

Copilot-authored PR merged as commit 431bd9e2, adding tests/integration/plugins/test_make.py with parametrized integration tests covering make plugin build/install and make-parameters forwarding, closing issue #1334.

Resolution: closed resolved

Reason: The PR was merged into main as commit 431bd9e2 (log for tests/integration/plugins/test_make.py), adding the previously missing make plugin integration tests plus a local test fixture; the tracked issue #1334 was closed by this merge. A proposed real-world project test was dropped during review, but the core goal was delivered.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the guidelines for contributing? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint && make test`? - [ ] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? --- ## Description Added comprehensive integration tests for the make plugin that were previously missing. The tests validate basic functionality and parameter forwarding using a parametrized test approach with local test fixtures. ## Changes Made - Created `test_make.py` with integration tests for the make plugin - Added test fixtures including a simple C program with Makefile for testing parameter forwarding - Used pytest parametrization to reduce code duplication while testing multiple scenarios - Refactored tests based on code review feedback to use string literals instead of lambda functions - Removed conditional validation logic to improve test maintainability - Removed accidentally committed CodeQL-generated file (`_codeql_detected_source_root`) - Merged main branch and resolved conflicts in `.gitignore` The tests include: 1. **Basic functionality test** - Verifies build and install using a simple C program with Makefile 2. **Parameter forwarding test** - Validates `make-parameters` are passed correctly via compile-time preprocessor definitions Test structure follows existing plugin patterns (cmake, scons, autotools) with local test fixtures and pytest integration. ## Note on Real-World Project Tests Initial attempts to include a real-world project test (tree utility) were removed based on code review feedback. The override-build approach used didn't actually test the make plugin behavior, as it duplicated make functionality with bash commands. Additionally, most real-world make-based projects either use autotools (covered by test_autotools.py) or have Makefiles that don't properly respect DESTDIR for all installation targets, making them unsuitable for isolated make plugin testing. ## Testing - ✅ All 4 test variations (2 test cases × 2 partition configurations) pass successfully - ✅ Linting passes with ruff - ✅ Tests follow the same patterns as other plugin integration tests - ✅ Merge conflicts resolved with main branch <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Add integration tests for make plugin</issue_title> > <issue_description>### What needs to get done > > The make plugin needs some integration tests to validate its behavior. Turns out, we never had any... > > ### Why it needs to get done > > Spawned from this TODO comment: > https://github.com/canonical/craft-parts/blob/a20b49d1b27ecd00ab74eb786d0f2403184adc97/tests/integration/plugins/test_make.py#L1</issue_description> > > <agent_instructions>Use at least one real-world repository that uses make to test the plugin. Use the cmake plugin integration tests as a starting point. > </agent_instructions> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> - Fixes canonical/craft-parts#1334 <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/canonical/craft-parts/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Copilot-authored PR merged as commit 431bd9e2, adding tests/integration/plugins/test_make.py with parametrized integration tests covering make plugin build/install and make-parameters forwarding, closing issue #1334.
stealth/space-bunny-alpha — closed resolved Merged #1387 (commit 431bd9e2), adding parametrized integration tests for the make plugin’s build/install flow and make-parameters forwarding; fixes #1334.
qwen/qwen3.6-35b-a3b — — Merged integration tests for the make plugin covering basic functionality and parameter forwarding. Addressed review feedback by refactoring tests, fixing DESTDIR failures, and updating commit messages. Resolved conflicts and passed CI.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Added integration tests for the make plugin validating build, install, and parameter forwarding via pytest parametrization. Removed unsuitable real-world tests, fixed DESTDIR failures, rewrote commits, and resolved conflicts.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: craft-parts#1334 (confidence 97%)

    Issue 'Add integration tests for make plugin' was the tracking issue the PR states it fixes, and it is now closed.

  • Related To: craft-parts#1340 (confidence 30%)

    Subsequent commit 656270ad ('style: add easy noqa fixes') touches the same test file.

Related issues

Issue Project State Summary Similarity
#1334 Add integration tests for make plugin craft-parts closed Request for make-plugin integration tests was fulfilled by merged PR #1387 (commit 431bd9e2), adding tests/integration/plugins/test_make.py plus a test_make fixture project covering build/install and make-parameters forwarding. Issue closed as done.
87%
#33 plugins: add make plugin craft-parts merged Merged PR #33 as commit 9a9d7c5c, adding a Make plugin for make-based parts (implementation commit 6e25a220).
74%