test(tools): register SELF cases independently #14558

Merged
Queuse merged 2 commits from upstream-pr/14558 into main 2026-11-02 22:39:18 +00:00
Queuse commented 2026-11-01 15:40:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Queuse on 2026-11-01T15:40:26Z.


What

Register each existing SELF unittest case as a separate CTest with the existing 30-second timeout. The aggregate suite exceeds that timeout on Windows even though its individual cases finish within it. Preserve the existing unwrap_self test name for one explicitly selected case, and track the test source as a configure dependency so new cases are registered automatically.

Tested

Head 69750caed2ef28e48d6bd2455d1737302b03a1b9, refreshed against main f2d874c1fdccf781c0fa5d86619bb5dd8894b958.

  • Windows 11 / WinLibs GCC 15.2.0 and Ubuntu WSL / GCC 15.2.0: relinker-only Release configuration and build pass; focused CTest selection passes 80/80 on each OS.
  • Independent registration audit finds exactly the same 80 unique unittest cases, each registered once with TIMEOUT=30, on both platforms. Existing platform skips inside unittest cases remain skips.
  • Complete Python suite: Windows 77 pass and 3 existing skips; Linux 78 pass and 2 existing skips.
  • Conventions and whitespace checks pass. The canonical overlap check is incomplete for #1835, #5021, #7642, #9508, #9539, #10193, #13578, #13928, #13929, #14044 and #14212 because those branches conflict with main. I reviewed their complete shared-file topic diffs at the scanned heads: they add unrelated CMake options, dependencies or test targets; none splits or selects SELF cases.
  • No title, console, full-product or hosted CI result is claimed.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5108867595 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14558). Originally posted by [Queuse](https://github.com/Queuse) on 2026-11-01T15:40:26Z. --- ### What Register each existing SELF unittest case as a separate CTest with the existing 30-second timeout. The aggregate suite exceeds that timeout on Windows even though its individual cases finish within it. Preserve the existing `unwrap_self` test name for one explicitly selected case, and track the test source as a configure dependency so new cases are registered automatically. ### Tested Head `69750caed2ef28e48d6bd2455d1737302b03a1b9`, refreshed against main `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`. - Windows 11 / WinLibs GCC 15.2.0 and Ubuntu WSL / GCC 15.2.0: relinker-only Release configuration and build pass; focused CTest selection passes 80/80 on each OS. - Independent registration audit finds exactly the same 80 unique unittest cases, each registered once with TIMEOUT=30, on both platforms. Existing platform skips inside unittest cases remain skips. - Complete Python suite: Windows 77 pass and 3 existing skips; Linux 78 pass and 2 existing skips. - Conventions and whitespace checks pass. The canonical overlap check is incomplete for #1835, #5021, #7642, #9508, #9539, #10193, #13578, #13928, #13929, #14044 and #14212 because those branches conflict with main. I reviewed their complete shared-file topic diffs at the scanned heads: they add unrelated CMake options, dependencies or test targets; none splits or selects SELF cases. - No title, console, full-product or hosted CI result is claimed. <!-- 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 <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
BunnyFl commented 2026-11-02 01:20:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T01:20:37Z.

Review: APPROVED


Windows 11, WinLibs GCC 15.2.0 r7, relinker-only Release configure (-DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON). Head 69750caed2 merged into upstream/main 93dbd0f82a:

  • ctest -N -R '^unwrap_self' lists 80 tests. unittest loads exactly 80 cases from test_unwrap_self.py, so every case is registered once.
  • The kept unwrap_self name carries UNWRAP_SELF_TEST=<class>.<case>.
  • ctest -R '^unwrap_self' -j8: 80/80 passed in 7.2 s.

This follows the existing per-case pattern used for trace_digest, and nothing later in the root CMakeLists.txt sets ENVIRONMENT on unwrap_self. With CMAKE_CONFIGURE_DEPENDS on the test source, cases added by other open PRs (#14534 adds one) are picked up at the next configure.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5731206335 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14558#pullrequestreview-5731206335). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-02T01:20:37Z. **Review:** APPROVED --- Windows 11, WinLibs GCC 15.2.0 r7, relinker-only Release configure (`-DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON`). Head 69750caed2 merged into upstream/main 93dbd0f82a: - `ctest -N -R '^unwrap_self'` lists 80 tests. `unittest` loads exactly 80 cases from `test_unwrap_self.py`, so every case is registered once. - The kept `unwrap_self` name carries `UNWRAP_SELF_TEST=<class>.<case>`. - `ctest -R '^unwrap_self' -j8`: 80/80 passed in 7.2 s. This follows the existing per-case pattern used for `trace_digest`, and nothing later in the root `CMakeLists.txt` sets `ENVIRONMENT` on `unwrap_self`. With `CMAKE_CONFIGURE_DEPENDS` on the test source, cases added by other open PRs (#14534 adds one) are picked up at the next configure.
MarcZX10 commented 2026-11-02 04:51:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T04:51:58Z.

Review: COMMENTED


Reviewed — no blocking findings

The CMake change registers each test_unwrap_self.py case as its own CTest entry: the first case is attached to the existing unwrap_self test through an environment variable, and the others are added with add_test. The Python main reads that variable and runs only the named case. I read the CMake logic and the test's main change. The hosted Windows run included only one of the new per-case entries, so most of them did not run hosted.

What I ran

  • Head 69750caed2ef28e48d6bd2455d1737302b03a1b9; base f2d874c1fdccf781c0fa5d86619bb5dd8894b958. 2 files, +22/-1: CMakeLists.txt (per-case registration) and tools/tests/test_unwrap_self.py (environment-selected main).
  • Read the full CMake block and the main change. The base unwrap_self test is defined at CMakeLists.txt line 257 at this head, so the first case has a test to attach to.
  • Read the test classes and cases (class UnwrapTest and its test_* methods, lines 94-193 at head).
  • Read-only checks from the trusted main checkout (precheck not run: this session does not run code from PR heads; no Python or CMake configure was run here): diff check, conventions and the stack check passed.
  • Hosted: the windows CTest run passed 2594 of 2594 cases; the log shows unwrap_self_UnwrapTest_test_phdr_mapping_other_load_bytes_preserves_input_and_output (Test #314). The other per-case entries do not appear in that log.
  • No MarcZX10 review at this head.

Results

Check Result Note
Diff check passed
Conventions and PR template passed conventions check from the main checkout
Mergeability and dependencies passed depends on none; the stack check passed
CMake per-case registration logic passed read; the first case reuses unwrap_self, the others use add_test
main selects the named case passed read; unittest.main(argv=[...]) with the environment value
Per-case entries in the hosted run partial one of the new entries appears in the Windows log; the rest do not
Build and runtime tests not run no local build; no Python or CMake run here
Negative controls not run no local build
Hosted CI passed windows passed (2594 cases); linux and relinkers skipped
Read-only check output

Precheck was not run: this session does not run code from PR heads. Hosted: gh api repos/boykopovar/AnyPS5/commits/69750caed2ef28e48d6bd2455d1737302b03a1b9/check-runs.

Negative control

Not run here. A negative control needs a build and running the Python tests, which is not done for code from PR heads in this session.

Findings

Blocking

None.

Non-blocking

  • The hosted Windows run did not include most of the new per-case entries. Please say where the cases are run (for example the Linux job, or a local run) so the coverage can be checked.

Sources

Not verified

  • The per-case entries were not run; the CMake configure and the Python tests were not run here.
  • Whether the Linux job runs all per-case entries was not checked.

To get this to a good state

  • Nothing blocking. A note of where the per-case entries run would close the coverage gap.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5732216632 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14558#pullrequestreview-5732216632). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T04:51:58Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The CMake change registers each `test_unwrap_self.py` case as its own CTest entry: the first case is attached to the existing `unwrap_self` test through an environment variable, and the others are added with `add_test`. The Python `main` reads that variable and runs only the named case. I read the CMake logic and the test's `main` change. The hosted Windows run included only one of the new per-case entries, so most of them did not run hosted. ## What I ran - Head `69750caed2ef28e48d6bd2455d1737302b03a1b9`; base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`. 2 files, +22/-1: `CMakeLists.txt` (per-case registration) and `tools/tests/test_unwrap_self.py` (environment-selected `main`). - Read the full CMake block and the `main` change. The base `unwrap_self` test is defined at `CMakeLists.txt` line 257 at this head, so the first case has a test to attach to. - Read the test classes and cases (`class UnwrapTest` and its `test_*` methods, lines 94-193 at head). - Read-only checks from the trusted main checkout (precheck not run: this session does not run code from PR heads; no Python or CMake configure was run here): diff check, conventions and the stack check passed. - Hosted: the windows CTest run passed 2594 of 2594 cases; the log shows `unwrap_self_UnwrapTest_test_phdr_mapping_other_load_bytes_preserves_input_and_output` (Test #314). The other per-case entries do not appear in that log. - No MarcZX10 review at this head. ## Results | Check | Result | Note | | --- | --- | --- | | Diff check | passed | | | Conventions and PR template | passed | conventions check from the main checkout | | Mergeability and dependencies | passed | depends on none; the stack check passed | | CMake per-case registration logic | passed | read; the first case reuses `unwrap_self`, the others use `add_test` | | `main` selects the named case | passed | read; `unittest.main(argv=[...])` with the environment value | | Per-case entries in the hosted run | partial | one of the new entries appears in the Windows log; the rest do not | | Build and runtime tests | not run | no local build; no Python or CMake run here | | Negative controls | not run | no local build | | Hosted CI | passed | windows passed (2594 cases); linux and relinkers skipped | <details><summary>Read-only check output</summary> Precheck was not run: this session does not run code from PR heads. Hosted: `gh api repos/boykopovar/AnyPS5/commits/69750caed2ef28e48d6bd2455d1737302b03a1b9/check-runs`. </details> ## Negative control Not run here. A negative control needs a build and running the Python tests, which is not done for code from PR heads in this session. ## Findings **Blocking** None. **Non-blocking** - The hosted Windows run did not include most of the new per-case entries. Please say where the cases are run (for example the Linux job, or a local run) so the coverage can be checked. ## Sources - CMake change: https://github.com/boykopovar/AnyPS5/blob/69750caed2ef28e48d6bd2455d1737302b03a1b9/CMakeLists.txt - Test `main`: https://github.com/boykopovar/AnyPS5/blob/69750caed2ef28e48d6bd2455d1737302b03a1b9/tools/tests/test_unwrap_self.py - Base test definition: https://github.com/boykopovar/AnyPS5/blob/69750caed2ef28e48d6bd2455d1737302b03a1b9/CMakeLists.txt#L257 ## Not verified - The per-case entries were not run; the CMake configure and the Python tests were not run here. - Whether the Linux job runs all per-case entries was not checked. ## To get this to a good state - Nothing blocking. A note of where the per-case entries run would close the coverage gap.
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!14558
No description provided.