Repository navigation
build(cmake): include the test fragments only when BUILD_TESTING is on - #20899
Conversation
|
Windows NVIDIA check of head Setup: Windows 11 Home 10.0.26300, i9-13900K, WinLibs GCC 15.2.0, Release, RTX 4080 (
The one test not run on both sides is Not checked: AMD, Linux, macOS, any commercial title. AI-assisted: yes |
|
Thanks, NathanFahey23. That covers Windows for both configure modes, plus the GPU set. I've added it to the description. |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the code gates fragment inclusion on BUILD_TESTING and guards PostCompile.cmake additions for a fragment-defined target.
What I ran
Inspected the prepared diff and the changed lines at head d0f373f63474b966cdab7b7351a1d141a4431684, plus surrounding CMake definitions and the agc_driver_bda_device_tests fragment. No configure or test commands were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed lines | passed | All five changed files inspected |
| Configure and tests | not run | No commands executed |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author's reported configure and test results were not independently verified. review/files.json was not available through the reader; the prepared manifest and file listing identify five changed files, all included for reading. The review folder's README and the related AGC test fragment were also read.
To get this to a good state
Nothing is required.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ESTING Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d0f373f to
442cdcd
Compare
|
Rebased onto |
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
|
Thanks @kiwe147 for including this one in the batch. This PR adds no test of its own, so the clean apply and full build onto |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The head moved to |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The reviewed change is internally consistent with its stated goal, and the available evidence supports merging.
What I ran
Reviewed head 9665e0443cca21d1f6db1573e5fa6a50fd78390b. No commands or tests were run; the PR description reports configure-only checks and convention checks, which I did not independently run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed source review | passed | All four changed files read |
| Configure and test checks | not run | Results are author-reported |
Findings
Blocking
None.
Non-blocking
None.
Not verified
I read CONTRIBUTING.md, core/libs/prx/libSceAgcDriver/CMakeLists.txt, core/libs/prx/libSceAgcDriver/PostCompile.cmake, core/libs/prx/libc/CMakeLists.txt, and core/libs/prx/libkernel/CMakeLists.txt; all files listed as reviewed in the manifest were read. No files were excluded. Configure behavior, test counts, and platform-specific results were not independently verified.
To get this to a good state
Nothing is required.
|
The head moved to AI-assisted: yes |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wn pull requests Each library's change selects all of its tests on the Windows job, and the three together ran past its 90 minute limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
|
New head |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The change gates AGC test fragment inclusion on BUILD_TESTING and guards post-compile additions for a fragment-defined target; the inspected code shows no blocking defect.
What I ran
Read the prepared diff and the changed CMake sections through repo_read.py at head b8d0dc348fabb1d9590340723cdde391b49b3356. No commands or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and targeted code review | passed | Three changed files inspected |
| Tests | not run | Author-reported configure checks only |
Findings
Blocking
None.
Non-blocking
None.
Not verified
Did not read the full text of all changed files or run configure/build checks. The author reports matching test lists with BUILD_TESTING=ON and successful configure checks with it off; those results were not independently verified. The PR bundle did not provide files.json through the reader. Files inspected: CONTRIBUTING.md diff; core/libs/prx/libSceAgcDriver/CMakeLists.txt lines 870–905; core/libs/prx/libSceAgcDriver/PostCompile.cmake lines 1–42. No files listed as excluded were available to inspect.
To get this to a good state
Nothing is required.
|
A correction to my note above: splitting this into #20899, #27716 and #27717 does not shrink what the Windows job runs. Edited 11-27: softened "comes down to the runner", which two runs do not establish. |
What
libSceAgcDriver includes every
tests/cmake/*.cmakefragment at the top level of itsCMakeLists.txt, outsideif(BUILD_TESTING). Each fragment therefore has to gate itself, and onmain520d66172a33 of the 414 have noBUILD_TESTINGin them. So a-DBUILD_TESTING=OFFconfigure still defines those test executables. And any fragment that uses something defined only inside aBUILD_TESTINGblock breaks that configure. That is how the release configure ofmain(BUILD_TESTING=OFF, the default) broke on 11-14: a dma-buf fragment calledset_tests_propertieson a test that exists only with tests on. #19877 fixed that by gating those fragments one at a time, and the next ungated fragment could repeat it.This moves libSceAgcDriver's
file(GLOB ...)/includeloop insideif(BUILD_TESTING). A fragment is then only read when tests are on, whether or not it gates itself. The one top-level line that configures a fragment-defined target (target_include_directories(agc_driver_gcn_compare_exec_writes_tests ...)) moves into the same block.Fragments that already gate themselves are unchanged; the inner
if(BUILD_TESTING)just nests.CONTRIBUTING.md's AGC fragment rule now says the fragments are read only withBUILD_TESTING, so a new fragment needs no guard of its own. WithBUILD_TESTING=ONthe configured tests are the same; see Tested.Making the
OFFconfigure pass needed one more change.libSceAgcDriver/PostCompile.cmake, which is included at the top level, adds sources and include directories toagc_driver_bda_device_tests, a fragment-defined target. Those two lines now sit underif(TARGET agc_driver_bda_device_tests), the same guard that file already uses foragc_driver_visual_test.Split (11-26). Until head
90c6cb7c3fthis pull request also gated the libc and libkernel fragment loops. With all three libraries changed, the Windows job selected every test of the three (3,536 targets) and was cancelled at its 90 minute limit on 11-24 and on 11-26. The libc part is now #27716 and the libkernel part #27717 (stacked on #26695), which I expected to let each job select one library's tests. Correction (11-27): I split these changes so that each Windows job would select only one library's tests, but that premise was wrong.tools/build_changed_guest_tests.pytreats a change to anyCMakeLists.txtundercore/libs/as a broad change and selects every guest test, so each of #20899, #27716 and #27717 still selects the full set (3,619 targets on #27716). Whether the Windows job fits its 90 minutes may depend on the runner (I have only these two runs): on 11-27 it passed in 86 minutes on #20899 and was cancelled at 90 minutes on #27716. This branch's commitb8d0dc348frepeats the same premise ("Each library's change selects all of its tests"); this correction applies to it too. TheCONTRIBUTING.mdrule for libc and libkernel fragments stays as it is here; I will update it once both have merged.Tested
11-26, head
b8d0dc348f(main520d66172amerged in as8fcbfe3fc4, no conflict, then the libc and libkernel changes moved out). Configure-only checks against thatmain(Linux, GCC 15.2, Ninja, Release,-DANYPS5_ENABLE_SPIRV_TOOLS=OFF):-DBUILD_TESTING=ON:ctest -Nlists the same 7,094 tests onmainand on this head, and the sorted test-name lists are identical.-DBUILD_TESTING=OFF: configures on both.ninja -t targets alllists 2,532*_testsexecutables here against 2,946 onmain(the AGC fragments are no longer read), and the defaultalltarget builds 29 against 30:agc_driver_registration_prepare_budget_testsis no longer built by default.tools/check_conventions.pypasses.Results at the previous head (11-25, all three libraries): Head
90c6cb7c3fmergesmainea4aadc321into the branch (11-25) to get a fresh CI run: the previouswindowsrun was cancelled after about 90 minutes. The merge had no conflict, and the PR's diff againstmainis unchanged. Configure-only checks against thatmain(Linux, GCC 15.2, Ninja, Release,-DANYPS5_ENABLE_SPIRV_TOOLS=OFF):-DBUILD_TESTING=ON:ctest -Nlists the same 6,954 tests onmainand on this head, and the sorted test-name lists are identical.-DBUILD_TESTING=OFF: configures on both. The defaultalltarget (ninja -t inputs all) builds 24*_testsexecutables onmainand 2 on this head. The 2 left areguest_audio_out_port_bounds_testsandguest_audio_out_system_state_output_time_bounds_tests, the libSceAudioOut ones fix(libSceAudioOut): keep the port bounds and output time tests inside BUILD_TESTING #23239 moves.Results at the previous head (11-24): head
9665e0443cmergesmainf7e5b032c6into the branch (11-24). The merge conflicted only in libkernel's fragment loop: #20991 had added theguest_kernel_sockname_truncation_boundsblock after the loop, outsideif(BUILD_TESTING)and at the indent of the test section. The resolution moves that block to the end of the test section above it, so it is built only with tests on, the same as #23239 does for two libSceAudioOut tests (that part stays with #23239). I also opened the libkernel move on its own as #26695, somaingets it even if this PR waits; whichever merges first, the other needs only a trivial rebase.Configure-only checks against that
main; Linux, GCC 15.2, Ninja, Release,-DANYPS5_ENABLE_SPIRV_TOOLS=OFF:-DBUILD_TESTING=ON:ctest -Nlists the same 6,823 tests onmainand on this head, and the sorted test-name lists are identical.-DBUILD_TESTING=OFF: configures on both. The defaultalltarget (ninja -t inputs all) builds 16*_testsexecutables onmainand 2 on this head: the 13 from fragments and the libkernel sockname test are gone, and the 2 left are the libSceAudioOut ones fix(libSceAudioOut): keep the port bounds and output time tests inside BUILD_TESTING #23239 moves.guest_kernel_sockname_truncation_boundsbuilds with tests on and passes in 3 of 3 runs (on fix(libkernel): keep the sockname truncation bounds test inside BUILD_TESTING #26695, which has the same block move).tools/check_conventions.pypasses.Earlier, at head
442cdcd590, rebased 11-20 ontomain43fccc9323, against thatmain(same setup):-DBUILD_TESTING=ON:ctest -Nlists the same 6,381 tests onmainand on this branch, and the sorted test-name lists are identical.-DBUILD_TESTING=OFF: configures onmainand on this branch.ninja -t targets alllists 2,304 targets named*_testson this branch against 2,712 onmain: 408 fewer, since the fragments are no longer read with tests off.mainhas since reverted (3556051744), so the resolution is the indented loop alone.mainb7aeb6f: the same 5,620 tests withON, and 729 test executables againstmain's 856 withOFF.PostCompile.cmakeguard, theOFFconfigure of this branch fails withCannot specify sources for target "agc_driver_bda_device_tests" which is not built by this project. That is why the guard is part of this change.git merge-treeagainst currentmainis clean. test(libkernel): cover coredump handler stack size edges and registration precedence #18873, which conflicted earlier, has merged.tools/check_conventions.pypasses on the branch and this body.d0f373f634(before this rebase) merged ontomain77ab3dc60c:BUILD_TESTING=OFFconfigure works, with 127 fewer test executables, as on Linux;video_out_flip_backtobackflake that then passed 5 of 5 on both sides;Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Summary by CodeRabbit
Tests
Documentation