test(menu): test_crt_options cuts the menu as it is now: no VRAM budget rows, apply_auto(), save()'s card and file calls #1006

Open
d4nkn3ss wants to merge 1 commit from d4nkn3ss/Longshot:test/crt-options-after-735 into main
Contributor

Type: test · Risk: low · Tested on: Windows 11, RTX 3080 · Needs: none

Why

test_crt_options has failed on main on every OS since #735, before checking anything. It checks that the CRT filter and CRT lines rows survive a save, a load, a preset and Auto. #735 removed the VRAM budget rows the check cuts out of gpu/vk/vk_menu.cpp (kVramBudgets, tx_vram_budget, sync_preset_budgets), so it stops with ValueError: substring not found. Under that, the code it cuts had moved on in other merges as well. I searched the open PRs for the check's name and these markers. #998 and #979 only list it among main's failures.

What changed

The check cuts the menu as it is on main and gives the cut code the stand-ins it now needs. What it asserts about the CRT rows is unchanged.

  • tests: tests/test_crt_options.py:
    • the /* BUDGETS */ and /* SYNC_BUDGETS */ cuts go, since their code is gone (#735);
    • apply_auto is declared and called without keep_own, which #735 removed. The case that said apply_auto(true) ("choosing again after the hardware changes") now calls it as main's own hardware-changed path does;
    • for save(): <cerrno>, <windows.h> or <sys/stat.h> and <unistd.h>, gpu_choice.h and gpu_device_cards (#736). These are the lines tests/test_menu_env_overrides.py already has;
    • for set_row: debug_warning, debug_warning_choice, menu_refresh and sync_transition_autosave().

Measurements

Verdict: nothing to measure: a check only. It fails on main and passes here.

Flags and settings

None

Testing

Tested: python -I -B tests/run_all.py from PowerShell on Windows 11, with llvm-mingw from the Longshot Builder.

main @ 1764fed2 this PR @ 0690065d
test_crt_options FAIL: ValueError: substring not found (constexpr int kVramBudgets =) pass
run_all.py in all 598 passed, 19 failed, 42 skipped 599 passed, 18 failed, 42 skipped

The 18 left fail on main too: test_auto_handheld, test_bug_report_defaults, test_crash_dialog, test_fsr_uniform_ownership, test_guest_imported, test_import_reach, test_linux_preflight, test_make_game_cache, test_missing_nup, test_pads_after_menu, test_parallel_init_order, test_pending_guest_import, test_release, test_replay_write_order, test_run_all_changed, test_tested_configurations, test_vk_occlusion_queries and test_walk_key. Some have open PRs: #1003, #993, #999, #592, #144, #954, #937 and #537.

Not tested: Linux and macOS. The POSIX branch's includes are the ones test_menu_env_overrides uses there.

Must be tested:

  • Linux, any compiler: python -I -B tests/run_all.py test_crt_options, expecting it to pass (by hand: the check's line in run_all's table)

Risks

What could break: nothing in the game: only tests/ changes.

Turning it off: revert the commit.

Compatibility: Nothing changes.

Issues

See #735

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A check under tests/ that reads changed source updated in this PR, not weakened.

🤖 Generated with Claude Code

**Type:** test · **Risk:** low · **Tested on:** Windows 11, RTX 3080 · **Needs:** none ## Why `test_crt_options` has failed on main on every OS since #735, before checking anything. It checks that the CRT filter and CRT lines rows survive a save, a load, a preset and Auto. #735 removed the VRAM budget rows the check cuts out of `gpu/vk/vk_menu.cpp` (`kVramBudgets`, `tx_vram_budget`, `sync_preset_budgets`), so it stops with `ValueError: substring not found`. Under that, the code it cuts had moved on in other merges as well. I searched the open PRs for the check's name and these markers. #998 and #979 only list it among main's failures. ## What changed The check cuts the menu as it is on main and gives the cut code the stand-ins it now needs. What it asserts about the CRT rows is unchanged. - tests: `tests/test_crt_options.py`: - the `/* BUDGETS */` and `/* SYNC_BUDGETS */` cuts go, since their code is gone (#735); - `apply_auto` is declared and called without `keep_own`, which #735 removed. The case that said `apply_auto(true)` ("choosing again after the hardware changes") now calls it as main's own hardware-changed path does; - for `save()`: `<cerrno>`, `<windows.h>` or `<sys/stat.h>` and `<unistd.h>`, `gpu_choice.h` and `gpu_device_cards` (#736). These are the lines `tests/test_menu_env_overrides.py` already has; - for `set_row`: `debug_warning`, `debug_warning_choice`, `menu_refresh` and `sync_transition_autosave()`. ## Measurements **Verdict:** nothing to measure: a check only. It fails on main and passes here. ### Flags and settings None ## Testing **Tested:** `python -I -B tests/run_all.py` from PowerShell on Windows 11, with llvm-mingw from the Longshot Builder. | | main @ 1764fed2 | this PR @ 0690065d | |---|---|---| | `test_crt_options` | FAIL: `ValueError: substring not found` (`constexpr int kVramBudgets =`) | pass | | `run_all.py` in all | 598 passed, 19 failed, 42 skipped | 599 passed, 18 failed, 42 skipped | The 18 left fail on main too: `test_auto_handheld`, `test_bug_report_defaults`, `test_crash_dialog`, `test_fsr_uniform_ownership`, `test_guest_imported`, `test_import_reach`, `test_linux_preflight`, `test_make_game_cache`, `test_missing_nup`, `test_pads_after_menu`, `test_parallel_init_order`, `test_pending_guest_import`, `test_release`, `test_replay_write_order`, `test_run_all_changed`, `test_tested_configurations`, `test_vk_occlusion_queries` and `test_walk_key`. Some have open PRs: #1003, #993, #999, #592, #144, #954, #937 and #537. **Not tested:** Linux and macOS. The POSIX branch's includes are the ones `test_menu_env_overrides` uses there. **Must be tested:** - Linux, any compiler: `python -I -B tests/run_all.py test_crt_options`, expecting it to pass (by hand: the check's line in run_all's table) ## Risks **What could break:** nothing in the game: only `tests/` changes. **Turning it off:** revert the commit. **Compatibility:** Nothing changes. ## Issues See #735 ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
test(menu): test_crt_options cuts the menu as it is now: no VRAM budget rows, apply_auto(), save()'s card and file calls
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 3s
Website / Website on Cloudflare (pull_request_target) Has been skipped
0690065d08
test_crt_options had failed on main on every OS since #735, which removed
the VRAM budget rows (kVramBudgets, tx_vram_budget, sync_preset_budgets) the
check cut out of gpu/vk/vk_menu.cpp, and apply_auto's keep_own. Past that,
the code it cuts had moved on too: save() writes the GPU device row's card
(gpu_choice.h, gpu_device_cards: #736) and replaces the options file with
Windows' or POSIX's own calls, and set_row reaches the Debug tools warning,
menu_refresh and sync_transition_autosave.

The two removed cuts go. apply_auto is declared and called without an
argument, as main's "the hardware changed" call is. The fixture gets the
includes and stand-ins test_menu_env_overrides already has for save(), and
four plain ones for set_row. What it checks about the CRT rows is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
d4nkn3ss changed title from WIP: test(menu): test_crt_options cuts the menu as it is now: no VRAM budget rows, apply_auto(), save()'s card and file calls to test(menu): test_crt_options cuts the menu as it is now: no VRAM budget rows, apply_auto(), save()'s card and file calls 2026-11-16 01:58:29 +00:00
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 3s
Website / Website on Cloudflare (pull_request_target) Has been skipped
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'test/crt-options-after-735:d4nkn3ss-test/crt-options-after-735'
git switch 'd4nkn3ss-test/crt-options-after-735'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1006
No description provided.