fix(build): give Windows test executables an asInvoker manifest #17778
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17778"
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 AlfaRojo on 2026-11-09T15:37:10Z.
What
On a Windows host with UAC, an executable without an application manifest whose file name contains
install,setuporupdateis treated as an installer and needs elevation, soctestreportsagc_draw_setup,guest_update_env,guest_gameupdate,guest_hmd_setup_dialogandguest_vr_setup_dialogas***Not Run(#16293). The WinLibs toolchain ships nodefault-manifest.o, so no test executable had a manifest.add_test_executablenow links a resource with anasInvokermanifest (cmake/WindowsManifest.manifest, throughcmake/WindowsManifest.rc.in) into every test executable on MinGW, so the installer heuristic no longer applies. A new test,test_executable_manifests, lists the test executables at generate time and fails with each executable that lacks theasInvokermanifest, so a futureadd_executablethat bypasses the helper is caught; an executable that was not built is skipped. The change is insideif(MINGW); Linux and macOS are untouched.Overlap:
tools/pr_overlap.pyreports #17730 onCMakeLists.txt(a newadd_subdirectory, different lines); the other hits are PRs that conflict withmainand could not be compared.Tested
Windows 11 Pro (10.0.26200), WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release, branch merged with
mainffe575754a.requestedExecutionLevel level="asInvoker", andctest --test-dir build -R '^(agc_draw_setup|guest_hmd_setup_dialog|guest_vr_setup_dialog|guest_update_env|guest_gameupdate)$'passes 5 of 5 as a normal user, wheremainreports them***Not Run.test_executable_manifestsagainst the executables of the previous full build, linked before this change, lists every one of them by name withno asInvoker manifest, so the check detects a missing manifest.-DANYPS5_RELINKER_ONLY=ON) rebuilt from scratch:test_executable_manifestsis registered (it was not before the last commit, as that configuration returns early) and passes over its 57 executables, each with the manifest. Two other tests fail there on this host for reasons outside this change:select_tests_FixtureBuildTestsbuilds its ownbeta/setup_tests.exefixture with a plainadd_executable, so the same installer heuristic blocks it (follow-up PR), andvulkan_validation_gate_commandsneeds the symlink privilege.Linux and macOS not run; nothing outside
if(MINGW)changes.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)