Repository navigation
build(quest): the Quest host tests are CMake targets run through presets (#2049) - #2074
Merged
Merged
Conversation
…t-host-tests-cmake * origin/main: docs(adr): ADR 0041, native code is built by CMake, not scripts (#2058)
…t for each recipe src/quest/host_tests builds the host test programs of the test-quest-* recipes as CMake targets (ADR 0041, #2049): one target for each program, an object library where several programs link the same objects, the fixture shared objects, the generated sources of the variant build, and ctest tests for what a program can run alone. The quest-host-<group> presets in src/quest/CMakePresets.json configure it with the host g++ (no NDK) into build/quest-host-<group>, so recipes that run in parallel never share a ninja directory; their build presets build host-tests-<group> and their test presets run the tests of that label. The extra-rows configure check gets a preset of its own. Refs #2049 Co-Authored-By: claude-main <agents@sprock.io> Co-Authored-By: Andrew Bates <a@sprock.io>
…ost tests through presets The 18 recipes that compiled test programs with g++ lines (data, data-net, invite, shared, router, invite-transport, tls, hooks, redirect, hooks-pinned, patcher, patcher-pinned, social, social-pinned, integration, plugins, autopilot, integration-pinned) now run cmake --preset, cmake --build --preset and ctest --preset of their quest-host-<group> preset. Their names, arguments, environment variables and printed lines stay. The harness steps (certificates and servers, the store files the -pinned recipes extract, the extra-rows configure checks, the NDK's jni.h) stay in the recipes and run the built programs by name. nlohmann-json now comes from the quest-host install in every recipe, and every recipe depends on _vcpkg-quest-host. tools/tests/test_quest_host_tests_cmake.py pins that those recipes hold no compiler command and no configure without a preset, that each has its presets, and that every program they built is still a target. Closes #2049 Co-Authored-By: claude-main <agents@sprock.io> Co-Authored-By: Andrew Bates <a@sprock.io>
…ython regex The check carried the ADR's POSIX class and never matched; a g++ line put back into a recipe now fails it. Refs #2049 Co-Authored-By: claude-main <agents@sprock.io> Co-Authored-By: Andrew Bates <a@sprock.io>
Co-Authored-By: claude-main <agents@sprock.io> Co-Authored-By: Andrew Bates <a@sprock.io>
…ost tests ride the host tools project The quest-host-* presets turn on NEVR_QUEST_HOST_TOOLS, the gate #2050 added for the quest-patcher preset, and src/quest/host/CMakeLists.txt enters src/quest/host_tests when NEVR_QUEST_HOST_TESTS is also on; there is one entry into the host build and not two. The patcher tests run the nevr_quest_patch_libr15 target of their own tree. The extra-rows check (libr15_extra_rows_check) is a target of the host tools, and cmake/libr15_extra_rows.cmake builds it through the quest-patcher preset instead of running a host g++ at configure time. Co-Authored-By: claude-main <agents@sprock.io> Co-Authored-By: Andrew Bates <a@sprock.io>
…e host-tools reuse The six wiring tests that looked for a test's compiler line in the test-quest-hooks and test-quest-plugins recipes read src/quest/host_tests/groups instead. test_quest_host_tests_cmake.py also pins that the host tests ride the host tools project and that the extra-rows check is a target built through the preset. Refs #2049 Co-Authored-By: claude-main <agents@sprock.io> Co-Authored-By: Andrew Bates <a@sprock.io>
…t-host-tests-cmake * origin/main: build(quest): the q15t host tests are CMake targets, not shell scripts (#2071)
metis-sprock
added a commit
that referenced
this pull request
Nov 4, 2026
Main turned the Quest host tests into CMake targets (#2074, #2071), which removed the shell recipes this branch had edited. The branch's two Quest test changes move into the new groups: the nevr_config_set_test target in shared.cmake (and its name in the pinned list of the shared group), and nevr_config.cpp plus the host yaml-cpp in the texture_menu_hook_test link in hooks.cmake. The N43 verify sensor and its comment hunk in the justfile are applied on main's justfile. Refs #1232 Refs #2060 Co-Authored-By: nevr-file-writes <agents@sprock.io> Co-Authored-By: Andrew Bates <a@sprock.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2049
The 18
test-quest-*recipes that compiled their test programs withg++lines now configure, build and run them through presets (ADR 0041).git grep -cE 'g\+\+ -std=' -- justfileis 51 on origin/main and 0 here.What it is
src/quest/host_tests/is the host test project: one target per test program, object libraries where programs share objects, the fixture shared objects, the generated sources of the variant build, ctest tests for what a program can run alone.quest-host-<group>(configure, build, and test where ctest runs it) insrc/quest/CMakePresets.json, where the Quest build's presets already are. Each recipe has its own build tree (build/quest-host-<group>), becausejust verifyruns these recipes in parallel and two ninja runs in one tree would corrupt each other. The presets turn onNEVR_QUEST_HOST_TOOLS, the gate thequest-patcherpreset added (build(quest): quest_patch_libr15 is a CMake target, not a g++ line in a recipe #2050), plusNEVR_QUEST_HOST_TESTS;src/quest/host/CMakeLists.txtentershost_tests. One host entry, not two.-std=c++17,-Wall -Wextra -Werror,-fno-exceptions,-pthread, sanitizers,-D_GLIBCXX_*,-isystemfor the host tree,-Wl,-z,..., build IDs). The preset pinsg++because the compile-fail patterns are GCC's wording.echolines are kept. The harness steps stay in the recipes and run the built programs by name: certificates and servers (data-net,tls), the store files the-pinnedrecipes extract, the generator-refusal and extra-rows configure checks oftest-quest-hooks, the NDKjni.hstep.justfile:1751from the review (cmake -S ... -B ...intest-quest-hooks) is nowcmake --preset quest-host-extra-rows-configure(src/quest/tests/extra_rows_configure/CMakePresets.json).src/quest/cmake/libr15_extra_rows.cmakeran a hostg++throughexecute_processat configure time.libr15_extra_rows_checkis now a target of the host tools (nevr_quest_libr15_extra_rows_check) and the function builds it withcmake --preset quest-patcherand--build --preset quest-patcher --target .... CMake can express it, so no ADR 0041 rule 6 reason is needed.test-quest-patcherruns thenevr_quest_patch_libr15target of its own tree and no longer needs thequest-patcherrecipe first;test-quest-patcher-pinnedstill runs the tool that recipe built.Differences a caller can see
tools/quest-host-deps) in every recipe; the recipes that took it from the PC mingw build no longer needjust buildfirst. Every recipe depends on_vcpkg-quest-host.build/quest-host-<group>/<group>/. ctest printsTest command:and timing lines around each program's own output.test-quest-hooks' toast and permission tests are defined whenANDROID_NDK_HOMEholdsjni.h; the recipe still stops, naming the NDK, when it does not.-pinnedrecipes' APK paths. They extract the files at run time and run the built program by name, so the target needs no path; the recipes' arguments are unchanged.Search statement
git grep -nE 'g\+\+ -std=' origin/main -- justfile: 51 lines in these 18 recipes (plus the recipes build(quest): quest_patch_libr15 is a CMake target, not a g++ line in a recipe #2050, build: compile checks and test-scripting use presets and targets #2052 and build(quest): the q15t host tests are CMake targets, not shell scripts #2053 converted since). Tip: none.justfile tools .github *.sh cmakeat the tip: no hit in the 18 recipes,src/quest/cmake,src/quest/host*; the remaining hits are other issues' files.git log -S host_tests --oneline -- src/quest: only this change.Siblings
Shape: a compiler or
cmake -S/-Bline in a recipe or a CMake script.justfile:1751cmake -S/-Bof the extra-rows configure andlibr15_extra_rows.cmake'sexecute_processcompile: fixed here;quest-patcher,test-scripting,test-quest-q15t,build-quest-combat-libs: fixed by their own PRs, merged before this one.Symbols
Edited:
src/quest/CMakeLists.txt(NEVR_QUEST_HOST_TESTS,enable_testing),src/quest/host/CMakeLists.txt,src/quest/CMakePresets.json,src/quest/cmake/libr15_extra_rows.cmake(nevr_libr15_check_extra_rows,nevr_libr15_extra_rowslose their work-dir argument),src/quest/sentinel/CMakeLists.txtandsrc/quest/tests/extra_rows_configure/CMakeLists.txt(their callers), the 18 recipes and comments injustfile, the six wiring tests that read the hooks and plugins recipes (test_quest_{vk_free_guard,crash_first,menu_version,plugin_default,quit_path,hand_pose_log}_wiring.py). New:src/quest/host_tests/**,tools/tests/test_quest_host_tests_cmake.py.Read, not edited: every test source and the code they link (no source changed),
tools/check_quest_social_frames.sh,test_quest_patcher_cmake.py,test_verify_parallel.py,test_workflows_ndk.py.Parity, before (origin/main
8f138299recipes, run in this worktree) and afterBefore: all 18 recipes exit 0, logs kept in
<scratch>. After: the same 18 exit 0 at the tip. Pinned recipes ran on the store APKr15_goldmaster_store.apk; theapkargument (the signed sentinel APK) was the one in the main checkout's build tree.curl_transport_test,data_wiring_testcurl_ws_tls_testunparsable_identity_trapsandextra_rows_embedding_is_byte_exactare the old inline checks, renamed (an independent review counted 43 programs at the merge-base,hand_flip_testincluded)zPLRframes check (before: inline)Built programs: every executable and fixture library the old recipes wrote with
-oexists in the new trees (compared per recipe: 0 missing; the extra ones are the fixture libraries the old recipes built in loops and functions). Program output: a line-multiset diff of each old log against its new log, with ctest's framing lines, process ids, timestamps and paths removed, leaves only timing and pid lines (thetlsstall and trickle timings, oneui_posttid, the shell's "Illegal instruction" notice).Mutants
g++ -std=c++17 ...line put back intotest-quest-invite-> FAILtest_quest_host_tests_cmake.py::test_no_recipe_holds_a_compiler_or_linker_command("test-quest-invite has a compiler command: ' g++ '"). The whole oldjustfileagainst the new test: 38 failed (18 recipes x compiler, preset, ctest).cmake --preset quest-host-extra-rows-configureput back ascmake -S . -B ...-> FAILtest_no_recipe_configures_cmake_without_a_presetandtest_the_extra_rows_configure_step_has_a_preset_of_its_own.nevr_ht_test(remote_ws_test ...)deleted fromgroups/router.cmake-> FAILtest_every_program_the_recipes_built_is_a_target_of_the_project(router listsremote_ws_testmissing).ws_wire.cppdropped fromloopback_game_server_test->just test-quest-routerexit 1,undefined reference to quest_net::HexEncode....ws_wire_test.cpp->just test-quest-routerexit 1,error: unused variable 'unused_mutant' [-Werror=unused-variable](the warnings are as strict as before).direct_recordcompile-fail pattern changed to one the diagnostic does not match -> ctestcf_direct_record_must_not_compileFailed, exit 8.find_program(NEVR_HOST_CXX ...)andexecute_process(COMMAND "${NEVR_HOST_CXX}" ...)appended tolibr15_extra_rows.cmake-> FAILtest_the_extra_rows_check_is_a_host_target_built_through_the_preset.test_quest_host_tests_cmake.py11 passed; all 18 recipes exit 0 (below).Lines with no behaviour (comments, the recipes' unchanged
echotext) have no mutant.Evidence on the tip
Run in
nevr-builds.slicewithDISPLAYandWAYLAND_DISPLAYunset,ANDROID_NDK_HOMEandNEVR_STORE_APKset, atb3edbb06(the tip before the lastorigin/mainmerge, which brought in only #2071, the q15t host tests):just test-quest-data,-data-net,-invite,-shared,-router,-invite-transport,-tls,-redirect,-social,-integration,-plugins,-autopilot,-hooks,-patcher: exit 0 each.just test-quest-hooks-pinned,-social-pinned,-integration-pinned,-patcher-pinned: exit 0 each.just test-tools: 6 failed, 3706 passed:test_heavy_guard.pyx5 (test: test_heavy_guard fails on main since heavy_guard.py was disabled by an early return #2015) andtest_agents_budget.py(docs(agents): AGENTS.md states only what binds: no fictional addendum, a generated N-rules index, a line budget #1313), the known six.python3 tools/verify_doc_paths.py: exit 0.python3 tools/verify_gtest_floor.py: exit 0 (3111, base 3111).On the merged tip
f1879cab:test_quest_host_tests_cmake.py,test_q15t_host_tests_cmake.py,test_quest_patcher_cmake.py34 passed;verify_doc_paths.pyexit 0;just test-quest-routerandjust test-quest-dataexit 0.Not run:
just verify,just build(no PC source changed), the Quest APK builds, a headset.Platform parity: not applicable (host test build only). No headline.
Branch lifecycle: deleted when this PR merges or closes.
Merge with main and ADR 0041 (claude-main, before merge)
main was merged in (it brought #2054 and #2071; no conflict). ADR 0041's last open row (#2049) is removed, and the empty table is replaced by a line naming #2065, which tracks the invocations the inventory did not list. On the merged tip:
python3 tools/verify_doc_paths.pyOK,tools/check_known_wrong.pyOK, and the structure, ADR and naming tests (test_quest_host_tests_cmake,test_adr_numbers,test_combat_libs_cmake,test_q15t_host_tests_cmake,test_quest_patcher_cmake,test_naming) 74 passed. The 18 recipes were not re-run after this merge; the independent review ran six of them, and both pinned ones, at f1879ca.Read AGENTS.md at c1cdb8c