Files
RedBear-OS/local
vasilito e3e1faece6 test-cookbook-apply-patches-e2e: 4 integration tests for the cookbook helper
Extracts the cookbook_apply_patches function from
src/cook/script.rs and runs it against the real
kf6-karchive source + migration patch. Verifies the
end-to-end flow that C-7 step 2 relies on:

  1. First apply: helper applies the patch via
     `git apply` from inside ${COOKBOOK_SOURCE},
     reports `applying 01-initial-migration.patch`
     and `applied=1 skipped=0 failed=0`.

  2. Idempotency: running the helper a second time
     detects the patch is already applied via
     `git apply --reverse --check` and reports
     `already applied, skipping`.

  3. Post-patch source state: the helper actually
     modifies the source — verifies that
     `ecm_install_po_files_as_qm` is now commented
     out (line starts with `#`) in the source after
     the helper runs.

  4. 4-level path resolution: verifies that the
     `${COOKBOOK_RECIPE}/../../../../local/patches/<name>`
     path used in the recipe's [build].script
     resolves to the actual patches dir
     `local/patches/kf6-karchive`.

These tests use a real pristine/source/patch fixture
(not mocks) and run the actual cookbook helper
extracted from src/cook/script.rs. Any change to
the helper's behavior (path handling, idempotency
check, git apply flags) is caught by these tests.

Makefile:
  - New `test-cookbook-apply-patches-e2e` target
  - Added to `lint-build-system-all` aggregate

Total: 4 new tests, 164 Python tests total (160 + 4).
All 10 test files pass in <1s.
2026-06-12 21:59:32 +03:00
..