ci(build): write ctest.log on the Windows pull request path so tests over 30 s are reported #14414
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14414"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by roboterspinne on 2026-11-01T11:52:19Z.
What
CONTRIBUTING.md:19says "CI reports every test over 30 s as a warning on the pull request". The Windows job'sReport tests slower than 30 sstep (.github/workflows/build.yml:731-737on26fa1212b8) runs on pull requests too (if: ${{ !cancelled() }}), but it starts with[ -f ctest.log ] || exit 0, and on pull requests nothing writesctest.log: only the push path does (tools/select_tests.py ctest ... --output-log ctest.log,build.yml:717). On pull requests the tests run throughtools/build_changed_guest_tests.py(build.yml:710), whose only test run is actestcall without--output-log(tools/build_changed_guest_tests.py:123-124), so the step finds no log and exits 0. The step came withbc02b80c18(8 Oct) and the guest pull request path later withaebcf0452a(29 Oct), whose message does not mention the report. Windows pull request jobs therefore never warn: job 124799687344 ranagc_shader_disk_cache_large_filein 58.13 s, and jobs 124800279901, 124799727392 and 124798085892 ran tests in 50.33 s, 46.69 s and 30.37 s, all without a##[warning], while the Windows push runs ofmaindo warn. The Linux job already writes the log on pull requests (build.yml:544) and runs the sameawk(build.yml:562-568).build_changed_guest_tests.pytakes an optional--output-log PATHand appends--output-log PATHto its singlectestrun; the Windows pull request step passes--output-log ctest.log. CTest resolves the path against the caller's working directory, the workspace root where the report step reads it, as on the push path. Without the option thectestcommand is unchanged, and theawkis not touched. Expected consequence:agc_shader_disk_cache_large_file(TIMEOUT 240; over 30 s in 4 of 25 recent Windows runs at 30.4-58.1 s, 14.0-29.8 s in the other 21) can warn on pull requests whose guest test selection includes it.test_output_log_reaches_the_ctest_runcallsmain()with--output-log ctest.logandsubprocess.runmocked, and asserts that exactly onectestcall carries-Iand that it passes--output-log ctest.log. The existing tests callmain()andrun()without the option and still pass.pr_overlap.py --branchcompared all 1653 open pull requests againstmainand reports no shared lines with any of them; none was left uncompared. My pull request "fix(tools): end the CTest index file with a newline so the Windows pull request job runs the last selected guest test" changestools/build_changed_guest_tests.pyand its tests in other lines; a trial merge of the two branches is clean.Tested
Windows 11, WinLibs GCC 15.2.0 (CTest 4.3.1 from the same WinLibs package), Python 3.13.9; synthetic CTest files only, no title or homebrew. No C++ build is needed.
python tools/tests/test_build_changed_guest_tests.py -v(registered as thebuild_changed_guest_testsCTest test,CMakeLists.txt:196):Ran 20 tests in 2.041s,OK (skipped=1)(the symbolic link test skips without the Windows symlink privilege, as onmain).tools/build_changed_guest_tests.pyof26fa1212b8fails witherror: unrecognized arguments: --output-log ctest.log; with the change it passes.ctest:run()with only thecmake --buildcalls stubbed, against aCTestTestfile.cmakewhose selected test sleeps 31 s, then the step's shell lines frombuild.yml:735-737withRUNNER_OS=Windowsin the same directory. On26fa1212b8:Passed 31.21 sec, noctest.log, the step exits 0. With this change:Passed 31.74 sec,ctest.login the working directory, and the step prints::warning title=Slow test::slow_guest_case took 31.7 s on Windows; tests must finish in 30 s (CONTRIBUTING.md)..github/workflows/build.ymlparses with PyYAML; the changed step readspython tools/build_changed_guest_tests.py build changed.txt --output-log ctest.log.python tools/check_conventions.py --base 26fa1212b8 --head HEADwith this title and description passed.build.ymlis inBROAD_CHANGES(tools/build_changed_guest_tests.py:15), so this pull request's Windows job selects every guest test, and a selected test that takes over 30 s there produces the::warning;agc_shader_disk_cache_large_filedid so in only 4 of 25 recent Windows runs, so this pull request's own run may show no warning.build.ymlcheck other steps:python tools/tests/test_mingw_host_only_test_targets.py(Ran 17 tests,OK) reads themingwHostTestsgate, andtest_build_eligibility.pyreads thegatescript and skips here withoutnode.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T13:44:03Z.
Review: COMMENTED
Reviewed — no blocking findings
The Windows pull-request path now writes
ctest.log, so the existing 30-second report step has a log to read; the change is limited to passing one option and does not touch the push path.What I ran
917984c07d350c043692a41d9f29ffc718f79c6a, baseba627802e2210187d417deb64c8f2fed8e33011f./usr/bin/python33.11.2, no build.python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14414 --output-dir /dev/shm/reviewer-run/precheck/14414python3 tools/pr_test_quality.py --root /dev/shm/reviewer-run/src2/14414 --json tools/tests/test_build_changed_guest_tests.py(0 findings)gh api(build.ymllines 710, 717, 735).Results
Precheck report, checks table, unedited (
/dev/shm/reviewer-run/precheck/14414/report.md):The precheck deliberately does not configure, build, or compile AnyPS5.git diff --check ba627802e2210187d417deb64c8f2fed8e33011f...917984c07d350c043692a41d9f29ffc718f79c6a/usr/bin/python3 tools/check_conventions.py --base ba627802e2210187d417deb64c8f2fed8e33011f --head 917984c07d350c043692a41d9f29ffc718f79c6a --title ci(build): write ctest.log on the Windows pull request path so tests over 30 s are reported --body /dev/shm/reviewer-run/precheck/14414/pr-body.mdNo changed source or public header under core/libs/prx./usr/bin/python3 -m py_compile tools/build_changed_guest_tests.py/usr/bin/python3 -m unittest tools.tests.test_build_changed_guest_tests/usr/bin/python3 tools/check_test_registration.py --scripts/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14414 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14414/stackNo C/C++ implementation or test files changed./usr/bin/python3 /dev/shm/reviewer-run/precheck/14414/head-917984c07d35-e64ce192/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14414/head-917984c07d35-e64ce192 --json .github/workflows/build.yml tools/build_changed_guest_tests.py tools/tests/test_build_changed_guest_tests.pyA pass means every candidate failed by assertion on base; a failure means at least one did not discriminate or could not run. See per-test results.Negative control
The new
test_output_log_reaches_the_ctest_runfails on base withunrecognized arguments: --output-log ctest.log(argparse exit 2), so it discriminates the change. The precheck classified itnot_executablebecause the failure is an argparse exit, not an assertion; that is a label issue, not a weak test.Findings
Blocking: none.
Non-blocking:
--output-logis passed only on the pull-request step; the report step's[ -f ctest.log ] || exit 0now finds the file on PR runs, as the PR describes.Sources
github.com/boykopovar/AnyPS5@917984c07d/.github/workflows/build.yml (L710)github.com/boykopovar/AnyPS5@917984c07d/.github/workflows/build.yml (L731-L737)Not verified
ctest --output-logon the Windows runner was not run here.