test(tools): isolate overlap encoding tests from the working directory #10836

Merged
TurboTheTurtle merged 1 commit from upstream-pr/10836 into main 2026-10-26 11:57:54 +00:00
TurboTheTurtle commented 2026-10-25 03:44:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TurboTheTurtle on 2026-10-25T03:44:13Z.


What

Make the PR-overlap encoding tests work when CMake builds outside the Git checkout. Mock repository-root discovery alongside command output and isolate its cache, while retaining the real subprocess encoding checks and temporary-repository integration test.

Tested

macOS 27.0.1 arm64, AppleClang 21, Python 3.14.7: all 254 relinker-only CTests pass. The unchanged-base encoding suite fails outside the checkout; the fixed suite passes all 11 tests there, including from a Unicode-named directory. Conventions check passes. Linux and Windows host runs were not performed.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Codex)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5001557319 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10836). Originally posted by [TurboTheTurtle](https://github.com/TurboTheTurtle) on 2026-10-25T03:44:13Z. --- ### What Make the PR-overlap encoding tests work when CMake builds outside the Git checkout. Mock repository-root discovery alongside command output and isolate its cache, while retaining the real subprocess encoding checks and temporary-repository integration test. ### Tested macOS 27.0.1 arm64, AppleClang 21, Python 3.14.7: all 254 relinker-only CTests pass. The unchanged-base encoding suite fails outside the checkout; the fixed suite passes all 11 tests there, including from a Unicode-named directory. Conventions check passes. Linux and Windows host runs were not performed. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes (Codex)
MarcZX10 commented 2026-10-25 03:46:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T03:46:00Z.

Review: APPROVED


Reviewed head . The test now mocks repository-root discovery and clears the cached root for each test context, keeping the subprocess output/encoding checks intact. I ran from a directory outside the checkout; all 11 tests passed. The conventions, intake, and labels checks pass. I found no issue in this focused test-only change.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5641386031 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10836#pullrequestreview-5641386031). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T03:46:00Z. **Review:** APPROVED --- Reviewed head . The test now mocks repository-root discovery and clears the cached root for each test context, keeping the subprocess output/encoding checks intact. I ran from a directory outside the checkout; all 11 tests passed. The conventions, intake, and labels checks pass. I found no issue in this focused test-only change.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!10836
No description provided.