test(relinker): cover CLI argument parsing #1856
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1856"
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 sarohy03 on 2026-10-08T22:09:42Z.
What
Cli::ParseArgs(core/relinker/cli/src/CliArgs.cpp) had no test coverage — the only test undercli/tests/isAutorunExitTests, which exercises the autorun launcher rather than the parser. This addscli_args_testsand registers it with CTest.Coverage:
--rpathand--exclude-sce-modulevalue consumption, including that the following token is taken verbatim and not re-parsed as a flag, and the "requires a value"/"requires a file name" errors when the value is missing;unused-filter=value validation (0/1/2 only, exactly one digit) and the single-specification guard;--exclude-sce-module/--skip-sce-moduleconflict, in both orders;--windows-diagnostics/--windows-guirequirement on--windows;No production code is changed; this only documents and pins the parser's current behaviour.
Tested
Built relinker-only on macOS (Apple Silicon, AppleClang) with
-DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON; all CTest tests pass, including the newcli_args. Also run through the Build workflow on a fork (Ubuntu g++, Windows MinGW-w64, macOS clang). No title or homebrew involved — it is a host-side unit test.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt — N/A, test-only change, no exports added.mdfiles or images added to the repository (attach them to this PR)