Skip to content

build(cmake): set explicit ctest timeouts for tooling tests - #21453

Merged
oneandonlydean merged 10 commits into
boykopovar:mainfrom
MarcZX10:build/ctest-tooling-timeouts
Nov 19, 2026
Merged

oneandonlydean merged 10 commits into
boykopovar:mainfrom
MarcZX10:build/ctest-tooling-timeouts

Conversation

@MarcZX10

Copy link
Copy Markdown
Contributor

What

Ten tooling tests were registered in the root CMakeLists.txt without an explicit TIMEOUT, so a stalled test waited for the job limit instead of failing at a bound. Each one now has set_tests_properties(<name> PROPERTIES TIMEOUT 30) directly after its add_test, in one commit per test: validate_patch_catalog, mingw_host_only_test_targets, build_changed_guest_tests, pr_labels, pr_ready, export_gap, audit_dump, ffmpeg_cache_keys, winlibs_digest and progress_comment_concurrency. The value follows the convention of the other registrations and of conventions_pr_template. Fixes #18418 (the validate_patch_catalog part; tools_catalog_json already has TIMEOUT 20 on main), Fixes #18436, Fixes #18437, Fixes #18439, Fixes #18451.

Tested

  • cmake -S . -B <dir> -G Ninja -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON: configures.
  • Each affected Python test file run directly with python3 -m pytest -q: all pass, each in about a second, well under 30 seconds.
  • python3 tools/check_conventions.py --base upstream/main: all checks passed.
  • git diff --check upstream/main...HEAD: clean.
  • Not run: ctest itself on this host.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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

@github-actions github-actions Bot added the build label Nov 16, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@MarcZX10 this is the combined PR the maintainer asked for on #18437 and #18451 (one PR for the CTest timeouts, with values measured on Linux and Windows), and it overlaps the five split PRs #18425, #18445, #18446, #18448 and #18452, which are waiting on it. What it still lacks is the measurement: the body says ctest was not run and 30 comes from the convention. Could you add the measured run time of each of the ten tests on Linux and on Windows (the CI jobs are enough) and say how the limit relates to them? Then this one can replace the split series.

@github-actions github-actions Bot added the fix error Closes an issue (Fixes #N) label Nov 16, 2026
@MarcZX10

Copy link
Copy Markdown
Contributor Author

CTest run times: Linux measured, Windows pending

Measured on Linux from head 635b1312 (build/ctest-tooling-timeouts). The tree was configured with ANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON, and the ten tests were run serially with ctest -j1.

Test Linux (s) Result
mingw_host_only_test_targets 0.13 Passed
build_changed_guest_tests 0.40 Passed
pr_labels 0.16 Passed
pr_ready 0.12 Passed
validate_patch_catalog 0.40 Passed
export_gap 0.27 Passed
audit_dump 0.76 Passed
ffmpeg_cache_keys 0.06 Passed
winlibs_digest 0.07 Passed
progress_comment_concurrency 0.06 Passed

Result: 10 of 10 passed. The slowest test takes 0.76 s, so the 30 s limit leaves about 39 times the measured maximum.

Not measured yet

  • Windows: no timings. I cannot run these tests on a Windows host from here.
  • CI: the Build, Conventions and PR labels runs for this head have been queued since 06:15 UTC and have not started, so there are no CI logs to read yet. These numbers come from a local ctest run, not from the CI Linux job.

Once a Windows run completes, its ctest log will give the Windows times. I will update this comment with them.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 16538 CMakeLists.txt L331
PR 18425 CMakeLists.txt L326, L331, L356, L361, L412, L452

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.

Pull request Shared files not compared
PR 1835 CMakeLists.txt
PR 7642 CMakeLists.txt
PR 9508 CMakeLists.txt
PR 9776 CMakeLists.txt
PR 10193 CMakeLists.txt
PR 10897 CMakeLists.txt
PR 13928 CMakeLists.txt
PR 13929 CMakeLists.txt
PR 18369 CMakeLists.txt
PR 22267 CMakeLists.txt
PR 22280 CMakeLists.txt
PR 22282 CMakeLists.txt
PR 22357 CMakeLists.txt
PR 22594 CMakeLists.txt

@cissalc1897

Copy link
Copy Markdown

The ten requested tests were ran serially on Windows 10 Home 22H2 (build 19045.6466), AMD Ryzen 7 7800X3D, Python 3.12.7, MSYS2 MinGW-w64 GCC 15.2.0, CMake/CTest 4.3.1 and Ninja 1.13.2. I configured a Release relinker-only build with BUILD_TESTING=ON.

All ten passed on head 635b1312dd2aad44b5a0145b7a2dc73e0d811b91. All ten also passed in five consecutive runs of GitHub’s test merge 6c77c352a4d6c1510375975d48cf313d0cfbdfe3, whose base was e7b62639d1a4f6b2bdc10696193a26e61b0cd700.

Test PR head (s) Test merge, five runs (s)
mingw_host_only_test_targets 0.635 0.533–0.752
build_changed_guest_tests 0.900 0.876–1.038
pr_labels 0.218 0.209–0.213
pr_ready 0.172 0.166–0.170
validate_patch_catalog 0.519 0.501–0.578
export_gap 0.834 0.860–1.308
audit_dump 1.885 1.873–2.099
ffmpeg_cache_keys 0.092 0.090–0.097
winlibs_digest 0.097 0.096–0.101
progress_comment_concurrency 0.089 0.086–0.097

The slowest observation was audit_dump at 2.099 s, so 30 s is about 14 times that measurement on this host. ctest --show-only=json-v1 reported an effective TIMEOUT of 120 s for each test on both revisions. raise_windows_tooling_test_timeouts runs after registration and raises individual timeouts below 120 s on Windows. Windows timeout rule

AI-assisted testing and report.

@MarcZX10
MarcZX10 force-pushed the build/ctest-tooling-timeouts branch from 635b131 to ef60272 Compare November 19, 2026 16:59
@oneandonlydean
oneandonlydean merged commit ae7d193 into boykopovar:main Nov 19, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment