fix(ci): recognize native test helper libraries #12167
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12167"
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 Queuse on 2026-10-28T01:01:27Z.
What
A native helper declared in
core/libs/CMakeLists.txtis classified as a product library even when all of its sources are tests. This suppresses consumers such ashost_thread_local_testsfrom the Windows host-only link check.Use original test-source locations for helper classification, with the existing declaration-directory fallback for targets without original sources. Follow actual linked helpers transitively so private links to product libraries or guest libc still exclude their consumers. Build-order dependencies do not determine this qualification.
Tested
Rebased head
421ce3f49eon main3a2b919816. The helper-classification patch is unchanged; the rebase retains main's CMake File API validation.9d6c2de6f1passes 25/25 selector tests on both platforms. This is a source-suite check, not a published combined head or full product build.33d17a635bpassed the relinker-only build and three focused CTests, plus hosted Windows host-only linking, all four relinker jobs and ASan in run 40612490212. Those results belong to the preceding head.Hosted run 40793193313 has since passed on rebased head
421ce3f49e: Windows host-only linking, all four relinker jobs and ASan. Linux product, register-context and write-watch jobs were skipped.Full product, title and GPU tests were not run on this rebase.
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 rooklz on 2026-10-28T01:17:35Z.
Review: APPROVED
Evidence review (macOS, host-only):
Red/green on a genuine CMake File-API reply. Built a scratch project (
core/libs/CMakeLists.txtdeclaringhost_thread_local_test_librarySHARED fromcore/libs/tests/HostThreadLocalLibrary.cpp+host_thread_local_testsexe linking it) and configured with the codemodel-v2 query:c96d9fff00:No changed host-only core/libs test executables require a link check— the helper is misclassified as a product library by declaration directory and the host test is silently dropped from the lane (the claimed bug, reproduced end-to-end);33d17a63: selectshost_thread_local_tests.No false positives. Two control replies: (1) test directly linking a
product_libbuilt fromcore/libs/utility/src/Utility.cpp— excluded on base AND head; (2) test → test-source helper →product_lib(transitive) — excluded on head via the new BFS. Both stay excluded, so the relaxation does not over-select.Real-tree parity. On a genuine 42-target relinker-only codemodel reply of this repo, base and head produce byte-identical selections (both empty — relinker-only has no core/libs test exes; the run still proves no over-selection or uncontrolled exception on real data).
Red projection. The 8 new tests against the base tool: exactly the 4 behavior-flip tests fail (
root_declared_native_helper,nested_test_directory_helper,order_only_dependency_on_product_target,finite_helper_link_cycle); the other 4 pin pre-existing behaviour (mixed sources, transitive product, helper→guest-libc, no-sources fallback). Module 17/17 on this Mac (macOS runners share the symlinked /var TMPDIR — all probes here ran under it;read_replyresolves consistently, no iter-#12159-style mismatch).Notes (non-blocking). (a) A core/libs library whose non-generated sources are not all under a
tests/directory is now classified product even when declared undercore/libs/tests— stricter than base; direction is conservative (drops lane coverage rather than linking guest code) and pinned bytest_excludes_library_with_mixed_test_and_product_sources. (b) The newinvalid library sourcesValueError lands in main()'s existing catch tuple → controlled exit 1. (c) BFS is O(N²) in targets; 42 targets here → negligible.pr_overlap for this head vs all open PRs: no overlap; base is an ancestor of current main with zero drift on both touched files.
Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-28T04:30:15Z.
Review: APPROVED
Reviewed
33d17a635b77b13fecfb8d82a197b47faec90143— approve. Native test-helper libraries are classified by their original sources, while product/guest-libc links are still excluded transitively.Windows/Python 3.11: head 17 passed (17 total); author base 9 passed (9 total). Current tests against old production fail four helper-selection assertions. The suite covers mixed sources, nested helpers, order-only dependencies and cycles. This tests the selection graph, not every selected native executable.
The inspected hosted Windows relinker job merged this exact head and completed successfully. This is not a full product or game build.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T10:05:53Z.
Review: CHANGES_REQUESTED
The implementation, test evidence, and compatibility review look sound. Current-main freshness remains: live
mainis3a40945e62and head33d17a635bis 474 commits behind it (merge basec96d9fff00). Please rebase and rerun the focused Python suite/conventions checks before merge.