test(tools): split debt_split cases into separate CTests #15907

Merged
Ondra97 merged 1 commit from upstream-pr/15907 into main 2026-11-09 05:59:36 +00:00
Ondra97 commented 2026-11-04 22:54:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Ondra97 on 2026-11-04T22:54:29Z.


What

The monolithic debt_split tool test timed out after 120.02 s in the Windows relinker job for #15242. Its independent unittest methods share one CTest budget. The current source has 33 methods, up from the 30 in the original submission.

Register each method separately using the existing conventions_wrapped_declarations discovery pattern. The first source method keeps the debt_split name; later names include the class and method. CMAKE_CONFIGURE_DEPENDS refreshes registrations when the source changes. The declared per-case timeout remains 20 seconds; current main's Windows tooling policy raises it to 120 seconds on Windows, and that policy is preserved.

Rebase onto current main while retaining its adjacent debt_report registration from the now-merged #15470. The complete diff remains the original 22-line change to root CMakeLists.txt; the tool, assertions and direct unittest.main() entry point are unchanged.

The current #14212 head 4d105ce487cac38c209496c2f8cbe3ae340d39da adds debt_format after debt_report. Static merge-tree inspection confirms its CMake block composes cleanly with this split and retains both registrations. The combined peer tree was not executed. There is no implementation prerequisite on that PR.

Tested

November 8, 2026 (Europe/Prague): main base 4ab649f4d87b71f13489a2fa03373c8a710d497b, submitted head 123426ee46aef9854104d901bd56ad1870c584b4.

Windows 11 Pro 10.0.26300; AMD Ryzen 9 7900X (24 logical processors); 31.66 GiB RAM; WinLibs GCC 15.2.0 r7 x86_64 UCRT POSIX SEH, CMake 4.3.1, Ninja 1.13.2 and Python 3.14.7. The installed GPU is an RTX 4070 Ti SUPER; these tests use no GPU. Git fixtures ran with native host process permissions and the host TEMP, without changing antivirus settings.

  • Relinker-only Release configuration and complete default build passed (375 build steps).
  • Independent AST enumeration, unittest.TestLoader and CTest JSON agree on all 33 methods, selected exactly once. Names, selectors and source regeneration dependencies are correct. Every generated case has the effective Windows timeout of 120 seconds under current main's policy.
  • Serial split run: 33/33 passed, zero failures/skips, 34.85 seconds total. Longest case: 4.52071 seconds (test_resolve_preserves_an_entry_moved_before_another_in_its_file).
  • Parallel -j4 split run: 33/33 passed, zero failures/skips, 9.48 seconds total. Longest case: 3.39764 seconds (test_resolve_preserves_entries_inserted_before_the_first_existing_entry). Verbose logs confirm one unittest per generated CTest in both runs.
  • Registration and adjacent-tool checks: 3/3 CTests passed, zero failures/skips: test_registration, test_script_registration and debt_report (16 unittests).
  • python tools/check_conventions.py --base origin/main, python tools/check_main_sync.py --base origin/main --strict and git diff --check origin/main...HEAD passed. The branch is one commit ahead and zero behind main, with a clean merge.

The local runs confirm current case coverage and local timeout headroom. A fresh run on the affected slow Windows CI runner is still needed to confirm that specific timeout is resolved. The full relinker CTest suite, full product build, Linux/macOS reruns and title tests were not run for this registration-only change.

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON -DCMAKE_CXX_COMPILER=g++ -DPython3_EXECUTABLE=C:/Python314/python.exe
cmake --build build --parallel 4
ctest --test-dir build -R '^debt_split' --show-only=json-v1 --no-tests=error
ctest --test-dir build -R '^debt_split' --no-tests=error -V -j 1
ctest --test-dir build -R '^debt_split' --no-tests=error -V -j 4
ctest --test-dir build -R '^(debt_report|test_script_registration|test_registration)$' --no-tests=error -V -j 1
python tools/check_conventions.py --base origin/main
python tools/check_main_sync.py --base origin/main --strict
git diff --check origin/main...HEAD

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:5162938333 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15907). Originally posted by [Ondra97](https://github.com/Ondra97) on 2026-11-04T22:54:29Z. --- ### What The monolithic `debt_split` tool test timed out after 120.02 s in the [Windows relinker job for #15242](https://github.com/boykopovar/AnyPS5/actions/runs/41533562100/job/125579701408). Its independent unittest methods share one CTest budget. The current source has 33 methods, up from the 30 in the original submission. Register each method separately using the existing `conventions_wrapped_declarations` discovery pattern. The first source method keeps the `debt_split` name; later names include the class and method. `CMAKE_CONFIGURE_DEPENDS` refreshes registrations when the source changes. The declared per-case timeout remains 20 seconds; current main's Windows tooling policy raises it to 120 seconds on Windows, and that policy is preserved. Rebase onto current main while retaining its adjacent `debt_report` registration from the now-merged #15470. The complete diff remains the original 22-line change to root `CMakeLists.txt`; the tool, assertions and direct `unittest.main()` entry point are unchanged. The current #14212 head `4d105ce487cac38c209496c2f8cbe3ae340d39da` adds `debt_format` after `debt_report`. Static merge-tree inspection confirms its CMake block composes cleanly with this split and retains both registrations. The combined peer tree was not executed. There is no implementation prerequisite on that PR. ### Tested <!-- 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. --> November 8, 2026 (Europe/Prague): main base `4ab649f4d87b71f13489a2fa03373c8a710d497b`, submitted head `123426ee46aef9854104d901bd56ad1870c584b4`. Windows 11 Pro 10.0.26300; AMD Ryzen 9 7900X (24 logical processors); 31.66 GiB RAM; WinLibs GCC 15.2.0 r7 x86_64 UCRT POSIX SEH, CMake 4.3.1, Ninja 1.13.2 and Python 3.14.7. The installed GPU is an RTX 4070 Ti SUPER; these tests use no GPU. Git fixtures ran with native host process permissions and the host TEMP, without changing antivirus settings. - Relinker-only Release configuration and complete default build passed (375 build steps). - Independent AST enumeration, `unittest.TestLoader` and CTest JSON agree on all 33 methods, selected exactly once. Names, selectors and source regeneration dependencies are correct. Every generated case has the effective Windows timeout of 120 seconds under current main's policy. - Serial split run: **33/33 passed**, zero failures/skips, 34.85 seconds total. Longest case: 4.52071 seconds (`test_resolve_preserves_an_entry_moved_before_another_in_its_file`). - Parallel `-j4` split run: **33/33 passed**, zero failures/skips, 9.48 seconds total. Longest case: 3.39764 seconds (`test_resolve_preserves_entries_inserted_before_the_first_existing_entry`). Verbose logs confirm one unittest per generated CTest in both runs. - Registration and adjacent-tool checks: **3/3 CTests passed**, zero failures/skips: `test_registration`, `test_script_registration` and `debt_report` (16 unittests). - `python tools/check_conventions.py --base origin/main`, `python tools/check_main_sync.py --base origin/main --strict` and `git diff --check origin/main...HEAD` passed. The branch is one commit ahead and zero behind main, with a clean merge. The local runs confirm current case coverage and local timeout headroom. A fresh run on the affected slow Windows CI runner is still needed to confirm that specific timeout is resolved. The full relinker CTest suite, full product build, Linux/macOS reruns and title tests were not run for this registration-only change. ```powershell cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON -DCMAKE_CXX_COMPILER=g++ -DPython3_EXECUTABLE=C:/Python314/python.exe cmake --build build --parallel 4 ctest --test-dir build -R '^debt_split' --show-only=json-v1 --no-tests=error ctest --test-dir build -R '^debt_split' --no-tests=error -V -j 1 ctest --test-dir build -R '^debt_split' --no-tests=error -V -j 4 ctest --test-dir build -R '^(debt_report|test_script_registration|test_registration)$' --no-tests=error -V -j 1 python tools/check_conventions.py --base origin/main python tools/check_main_sync.py --base origin/main --strict git diff --check origin/main...HEAD ``` ### 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: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes
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!15907
No description provided.