test(checks): 99 more checks cut with srccut, not a copy of their own #949
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!949
Loading…
Reference in a new issue
No description provided.
Delete branch "zeldaootr/Longshot:tests-source-cut"
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?
Summary
Nothing a player would notice: this is about the game-free checks. #27 gave the checks one cutter,
tests/srccut.py, and moved 78 of them to it; main still had over a hundred checks undertests/with their own copy of the plain brace counter (under the namesblock,function,bodyorcut), which counts braces in comments and strings and stops with a bareValueErrorwhen a function is renamed. This PR moves 98 of them tosrccut; every cut they make is the text the old counter cut. (The title and the commit say 99: the 99th,tests/test_program_load_wait.py, was moved on main meanwhile, so main's file stands and this PR no longer touches it.)This PR first opened with a cutter of its own (
tests/source_cut.py), written before #27 merged. That module is gone from it: one cutter is the point.Read first:
tests/: their copy of the plain counter removed; they puttests/on the path and importblock(asfunction,bodyorcutwhere that was the copy's name). A mechanical change, made by a script, one commit. Only copies that are the plain counter exactly (their syntax trees compared, names aside) were moved. Where main's newer import blocks (sys, thetests/path,menu_model_fixture, from #1774) were already there, they stay and thesrccutimport follows them.tests/test_nvn_null_pool.py,tests/test_nvn_tex_builder_guard.py: both caughtValueErrorfor a marker an older--sourcelacks, whichsrccutdoes not raise (it stops the check); they ask whether the marker is there first.srccutstops and the old counter took the first silently:test_invalidate_vcore,test_multiwait_wake,test_png_publication,test_predict_sees_loaded,test_prepared_stamps,test_program_cache_cleanup,test_program_cache_index,test_prompts_live. Each needs a look, as #27 says of its 13.ROOTline to anchor the import on (5 undernx2/), andnx2/test_coop_spirv.py, so that this PR touches onlytests/.See #27
Testing
Tested: on Linux x86-64 (Ryzen 7 5700U; clang 23.1.5, g++, glslang, spirv-val, the Vulkan and SPIR-V headers), in the PC's job queue, at this head (
c3970f89con main068fb8ebe): the 98 moved checks by name (103 checks: a few names are the start of others'), on main068fb8ebeand here withSRCCUT_CHECK_NAIVE=1: 90 passed and 13 failed on both, the same 13:test_capture_readback_visibility,test_damage_debug_menu,test_linux_pressure,test_mods_size_table,test_portable_setup_start,test_portable_setup_transaction,test_present_aspect_vulkan,test_present_source_crop,test_present_thread,test_psychov35_fsr3_fg,test_readback_timeout_source,test_setup_runtime_paths,test_vk_occlusion_queries(three of them Windows-only checks a full run skips on Linux;test_present_aspect_vulkanneeds a Vulkan device).tests/test_srccut.pypasses. the 112 checks that read its files (run_all.py --changed forge/main): 102 passed, 10 failed, 4 skipped (Windows-only, or a Vulkan 1.3 device), the 10 failing on main too; and the wholepython3 -I -B tests/run_all.py(not--strict) here and on main068fb8ebe, back to back in the same environment: here 781 passed, 61 failed, 28 skipped; main 782 passed, 60 failed, 28 skipped. Every check that fails here fails on main too, buttest_prepare_stall, a timed check that failed here in the loaded 16-way run and passes alone (twice); main's failures are this PC's environment (tools, modules and timing). Nothing runs in the game: the PR touches only checks undertests/.Rebased since onto main
1780fbe0c(headef370f132): one of the 98,tests/test_parallel_small_cb.py, is gone because main deleted it with the parallel replay it tested (#1763), so 97 are moved. The wholetests/run_all.pyin the job queue atef370f132and at main1780fbe0c: 773 passed, 71 failed, 28 skipped on both; the failing names are the same aftertests/test_job_queue.py(failed here only) andtests/test_pipeline_cache_save.py(failed on main only) each passed on both sides when run again alone. The 12 moved checks that fail, fail on main for the same reason.SRCCUT_CHECK_NAIVE=1was not run again at this head; the numbers below are fromc3970f89c.The 59 checks that fail both here (
c3970f89c) and on main068fb8ebetest_appimage_player_build,test_bug_report_defaults,test_capture_read_once,test_capture_readback_visibility,test_crash_dialog,test_crt_options,test_damage_debug_menu,test_dev_ab,test_dev_packs,test_discover,test_display_startup_failure,test_dlss_feature_size,test_draw_stream_visibility,test_failed_compile_keeps_objects,test_frame_overlap,test_fsr3fi_hud_layer,test_fsr_image_retirement,test_fsr_uniform_ownership,test_guest_imported,test_high_fps_fixes,test_host_guest_writes,test_hud_layout_row,test_libc_hooks,test_lift_cache,test_lift_lookups,test_linux_preflight,test_linux_pressure,test_linux_tools,test_linux_update,test_log_open_failure,test_make_game_cache,test_make_game_ngx,test_mise_build,test_missing_nup,test_mods_list,test_mods_size_table,test_ngx_sdk,test_nonuniform_image_arrays,test_parallel_init_order,test_pending_guest_import,test_pipeline_play_cache,test_prepare_cache_save,test_present_queue_default,test_present_source_crop,test_present_thread,test_profiling_mode,test_psychov35_fsr3_fg,test_readback_timeout_source,test_replay_write_order,test_slow_frames,test_song_note_cue,test_staging_burst,test_texel_buffer_ownership,test_thinlto_tls,test_upscaler_rows,test_vcore_escape,test_vk_occlusion_queries,test_walk,test_walk_keyStill to test:
python -I -B tests/run_all.py, expecting the same results as onmain(by hand, or CI where it runs the checks on Windows)Measurements
Verdict: nothing changes but where the checks get their cutter: the moved checks pass and fail exactly as on
main, and withSRCCUT_CHECK_NAIVE=1every cutsrccutmakes is also made by the old counter and compared: none differs in the 90 checks that pass (a difference would stop the check). Nothing to measure in the game.Setup: Linux x86-64, Ryzen 7 5700U; no game run; the 98 moved checks by name through
tests/run_all.py --jobs 5, once onmainand once here withSRCCUT_CHECK_NAIVE=1(SRCCUT_CHECK_NAIVE=1 python3 -I -B tests/run_all.py <the moved checks' names>), in the PC's job queue068fb8ebec3970f89cRisks
A moved check whose marker comes to be in its source twice now stops and says so, where its own counter took the first. It touches 97 checks other open pull requests may touch, a few lines each at the import block: whichever lands second rebases, and this one's commit is made again by its script. A revert is enough to undo it. A player notices nothing: no game file, save,
longshot_options.inior cache changes.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold. [measured again on main068fb8ebe; the head is not pushed yet, so CI has not run on it]3b64e7a5aa3c8c941bb4Description moved to the current template. Each commit's subject is a Conventional Commit now (the branch is 3c8c941b; no change to the files).
3c8c941bb49622b74ce7Reworked: #27 merged its own cutter,
tests/srccut.py, while this was open, so this PR no longer adds one. It now moves 99 more checks with the plain counter ontosrccut(branch 9622b74c on maina8a30c22), each cut compared with the old counter's (SRCCUT_CHECK_NAIVE=1).WIP: test(checks): one source cutter for the checks, not a copy in eachto WIP: test(checks): 99 more checks cut with srccut, not a copy of their ownWIP: test(checks): 99 more checks cut with srccut, not a copy of their ownto test(checks): 99 more checks cut with srccut, not a copy of their ownBrought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).
mooki referenced this pull request2026-11-17 21:48:11 +00:00
9622b74ce78fb917cae9Rebased onto main
430eef4f2(it conflicted in two checks).tests/test_program_load_wait.pywas already moved tosrccuton main, so main's text stands and this PR no longer touches it;tests/test_setup_tool_merge.pykeeps main's newer comment.tests/run_all.pyon Linux at this head and on main430eef4f2in the same environment: the same checks fail on both.8fb917cae9aebe1c185eRebased onto main
8fde50a21(one conflict, tests/test_threaded_rendering.py: main rewrote the check, so main's file stands with only the counter swapped for the srccut import). All 98 touched files differ from main's by that swap alone, apart from the two intended changes. tests/run_all.py on Linux at this head and on main8fde50a21in the same environment (742 passed / 52 failed here, 743 / 51 on main): two checks failed here only in the loaded full run and both pass twice alone.aebe1c185e895e9f81dcRebased onto main
0de25c3e4(head895e9f81d). Main's menu-model refactor (#1774) addedimport sys, thetests/path andmenu_model_fixtureto the import blocks oftest_auto_settings,test_damage_debug_menu,test_intel_compiles_autoandtest_threaded_rendering, where this PR puts itssrccutimport: each keeps main's lines and adds thesrccutimport after them, withsysimported once at the top. Otherwise the commit is as before; a full run here (789 passed, 57 failed) fails nothing that passes on main0de25c3e4(788 / 58).895e9f81dcc3970f89c7Rebased onto main
068fb8ebe, the docs and tools revamp (headc3970f89c), with no conflict: the commit is the same as before (git range-diff:=). The description now follows the new template; it counts 98 moved checks, sincetest_program_load_waitwas moved on main earlier and this PR no longer touches it (the title and commit still say 99). The moved checks were run again on main068fb8ebeand here withSRCCUT_CHECK_NAIVE=1, and the full game-free run fails nothing here that main doesn't also fail on this PC.Rebased onto main
1780fbe0c(headef370f132). One conflict: main deletedtests/test_parallel_small_cb.pywith the parallel replay it tested (#1763), so that file is dropped here and 97 checks are moved, not 98. The wholetests/run_all.pygives the same result here and on main1780fbe0c(773 passed, 71 failed, 28 skipped; the same failing names once two timing-sensitive checks were run again alone).SRCCUT_CHECK_NAIVE=1was not run again at this head.c3970f89c7ef370f1327Rebased onto main
8859673e4(head9e1cfdde1). One conflict, intests/test_collect_wide.py, which main rewrote: main's new cases are kept as they are, and its own copy of the brace counter is replaced by thesrccutimport as in the other moved checks. That check passes here after the rebase (x86-64, SSE2 and AVX2 walks). The rest of the checks were not run again at this head.ef370f13279e1cfdde17Rebased onto main
bca5fab96(head2dc39cd12); the commit applied without a conflict. Twenty-five of the moved checks, run here and on mainbca5fab96, give the same result on both; the rest were not run again at this head.9e1cfdde172dc39cd128View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.