docs: explain relinker Python test discovery #1945

Merged
TacoCat055 merged 1 commit from upstream-pr/1945 into main 2026-10-10 05:36:33 +00:00
TacoCat055 commented 2026-10-09 01:35:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TacoCat055 on 2026-10-09T01:35:51Z.


What

Explain that Python must be found during CMake configuration for Python tests to be registered. Add guidance for checking test discovery with ctest -N, using input_magic as an example, and setting Python3_EXECUTABLE when automatic discovery fails.

Tested

On Windows with MinGW GCC 15.2 and Python 3.13:

  • Verified automatic Python discovery and an explicit Python3_EXECUTABLE path.
  • Built the relinker-only configuration.
  • Confirmed all 36 tests were registered, including input_magic.
  • 35 tests passed in the initial run; windows_import_modules passed when rerun outside the Codex sandbox.
  • Convention checks and git diff --check passed.

Checklist

  • Based on current main; checked open PRs for duplicate Python test discovery guidance
  • One topic per PR
  • No code comments added
  • Unimplemented paths and silent stubs: not applicable, documentation only
  • No investigation notes or images added to the repository
  • New third-party code: not applicable
  • Generic guidance, not specific to one title
  • Depends on: none
  • AI-assisted: yes, with ChatGPT and Codex; changes reviewed and commands tested locally
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4794848148 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1945). Originally posted by [TacoCat055](https://github.com/TacoCat055) on 2026-10-09T01:35:51Z. --- ### What Explain that Python must be found during CMake configuration for Python tests to be registered. Add guidance for checking test discovery with `ctest -N`, using `input_magic` as an example, and setting `Python3_EXECUTABLE` when automatic discovery fails. ### Tested On Windows with MinGW GCC 15.2 and Python 3.13: - Verified automatic Python discovery and an explicit Python3_EXECUTABLE path. - Built the relinker-only configuration. - Confirmed all 36 tests were registered, including input_magic. - 35 tests passed in the initial run; windows_import_modules passed when rerun outside the Codex sandbox. - Convention checks and git diff --check passed. ### Checklist - [x] Based on current `main`; checked open PRs for duplicate Python test discovery guidance - [x] One topic per PR - [x] No code comments added - [x] Unimplemented paths and silent stubs: not applicable, documentation only - [x] No investigation notes or images added to the repository - [x] New third-party code: not applicable - [x] Generic guidance, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes, with ChatGPT and Codex; changes reviewed and commands tested locally
MarcZX10 commented 2026-10-09 01:43:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T01:43:55Z.

Review: APPROVED


Reviewed the full diff and the related CMake registration logic. The documentation accurately explains that the Python interpreter is discovered at configure time, ctest -N confirms registration, and Python3_EXECUTABLE can be supplied explicitly. The example test exists in the relinker-only test list. No blocking issue found. Upstream currently has no check results for this fork head (action_required still needs maintainer approval); the reported local validation is useful but does not replace upstream CI.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5464806996 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1945#pullrequestreview-5464806996). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T01:43:55Z. **Review:** APPROVED --- Reviewed the full diff and the related CMake registration logic. The documentation accurately explains that the Python interpreter is discovered at configure time, `ctest -N` confirms registration, and `Python3_EXECUTABLE` can be supplied explicitly. The example test exists in the relinker-only test list. No blocking issue found. Upstream currently has no check results for this fork head (`action_required` still needs maintainer approval); the reported local validation is useful but does not replace upstream CI.
MarcZX10 commented 2026-10-09 01:47:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T01:47:18Z.


I reviewed and approved the current head. Upstream still shows no checks for this fork PR; the Conventions workflow appears to need maintainer approval under CONTRIBUTING. Could an authorized maintainer approve its queued workflow run so the upstream PR gets its required check result?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6072579724 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1945#issuecomment-6072579724). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T01:47:18Z. --- I reviewed and approved the current head. Upstream still shows no checks for this fork PR; the Conventions workflow appears to need maintainer approval under CONTRIBUTING. Could an authorized maintainer approve its queued workflow run so the upstream PR gets its required check result?
Dextroid17 commented 2026-10-09 03:01:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-09T03:01:26Z.

Review: COMMENTED


Verified on Linux — every claim in the addition matches this tree.

  • The gating is real: core/relinker/CMakeLists.txt:191-192 is find_package(Python3 QUIET COMPONENTS Interpreter) followed by if(Python3_Interpreter_FOUND), and the add_test entries inside use ${Python3_EXECUTABLE}. So "Python must be found during CMake configuration for Python tests to be registered", and Python3_EXECUTABLE as the override, are both accurate.
  • The example test is discoverable: ctest --test-dir build -N | grep input_magic → one hit, so a reader who follows the instruction finds what the sentence promises.
  • The directory name matches its context: build-relinker is what the lines immediately above configure (BUILD.md:8-10).
  • The repo's own tools agree: python3 tools/check_conventions.py --base upstream/main → "All conventions checks passed"; python3 tools/check_test_registration.py build → "439 test executable(s), 3 built and not run as recorded, none new".

Not verified: the Windows numbers in the body (36 tests in a relinker-only configuration, 35 passing / 1 failing) — that count is configuration-specific and I did not reproduce the relinker-only configuration here.

Written with AI assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5465230756 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1945#pullrequestreview-5465230756). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-09T03:01:26Z. **Review:** COMMENTED --- Verified on Linux — every claim in the addition matches this tree. - **The gating is real**: `core/relinker/CMakeLists.txt:191-192` is `find_package(Python3 QUIET COMPONENTS Interpreter)` followed by `if(Python3_Interpreter_FOUND)`, and the `add_test` entries inside use `${Python3_EXECUTABLE}`. So "Python must be found during CMake configuration for Python tests to be registered", and `Python3_EXECUTABLE` as the override, are both accurate. - **The example test is discoverable**: `ctest --test-dir build -N | grep input_magic` → one hit, so a reader who follows the instruction finds what the sentence promises. - **The directory name matches its context**: `build-relinker` is what the lines immediately above configure (`BUILD.md:8-10`). - **The repo's own tools agree**: `python3 tools/check_conventions.py --base upstream/main` → "All conventions checks passed"; `python3 tools/check_test_registration.py build` → "439 test executable(s), 3 built and not run as recorded, none new". Not verified: the Windows numbers in the body (36 tests in a relinker-only configuration, 35 passing / 1 failing) — that count is configuration-specific and I did not reproduce the relinker-only configuration here. Written with AI assistance.
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!1945
No description provided.