test(input): the pad layout fixture includes hold_toggle.h #331

Open
d4nkn3ss wants to merge 1 commit from d4nkn3ss/Longshot:fix/test-pad-layout-hold-toggle into main
Contributor

Why

tests/test_pad_layout.py fails on main since #137 (hold-to-toggle): its copy of host/nn_hid.c's binding table now declares a HoldToggle, and the fixture doesn't include the header that defines it, so the check can't compile.

What changed

  • tests: the fixture's hid.c in tests/test_pad_layout.py includes host/hold_toggle.h, as tests/test_bound_keys.py already does. No game code changes.

Flags and settings

None.

Measurements

main: 5ad0f503 (2026-11-13); the failure below is on ba700f58 and still on 5ad0f503
this PR: fix/test-pad-layout-hold-toggle @ bc375c20
Hardware: i9-12900K, 64 GB, Windows 11 Pro 26300, llvm-mingw from the Longshot Builder
Method: a test fixture only; what is compared is the check's result, the same on every run
How to reproduce: python -I -B tests/test_pad_layout.py

main @ ba700f58 this PR @ bc375c20
tests/test_pad_layout.py fails (does not compile) passes
main @ ba700f58:
FAIL: test_presets (__main__.PadLayoutTests.test_presets)
AssertionError: 1 != 0 : ...\hid.c:62:8: error: unknown type name 'HoldToggle'

this PR @ bc375c20:
Ran 2 tests in 0.277s
OK

Testing

Tested: python -I -B tests/test_pad_layout.py (above), and python -I -B tests/run_all.py on Windows 11 with llvm-mingw: 506 passed, 1 failed, 33 skipped. The one failure, tests/test_release.py, fails on main too (#119 fixes it).

Not tested: Linux. The include is the same relative path tests/test_bound_keys.py uses there.

Needs other testers: None.

Screenshots

Nothing on screen

Risk and rollback

None for the game. Reverting the commit is enough.

Issues

See #137.

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above).
  • Tested in the game, or what wasn't is named under Testing.
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. (Not applicable: a test fixture only.)
  • 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.

If applicable

  • 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

## Why `tests/test_pad_layout.py` fails on main since #137 (hold-to-toggle): its copy of `host/nn_hid.c`'s binding table now declares a `HoldToggle`, and the fixture doesn't include the header that defines it, so the check can't compile. ## What changed - tests: the fixture's `hid.c` in `tests/test_pad_layout.py` includes `host/hold_toggle.h`, as `tests/test_bound_keys.py` already does. No game code changes. ## Flags and settings None. ## Measurements main: 5ad0f503 (2026-11-13); the failure below is on ba700f58 and still on 5ad0f503 this PR: fix/test-pad-layout-hold-toggle @ bc375c20 Hardware: i9-12900K, 64 GB, Windows 11 Pro 26300, llvm-mingw from the Longshot Builder Method: a test fixture only; what is compared is the check's result, the same on every run How to reproduce: `python -I -B tests/test_pad_layout.py` | | main @ ba700f58 | this PR @ bc375c20 | |---|---|---| | `tests/test_pad_layout.py` | fails (does not compile) | passes | ``` main @ ba700f58: FAIL: test_presets (__main__.PadLayoutTests.test_presets) AssertionError: 1 != 0 : ...\hid.c:62:8: error: unknown type name 'HoldToggle' this PR @ bc375c20: Ran 2 tests in 0.277s OK ``` ## Testing **Tested:** `python -I -B tests/test_pad_layout.py` (above), and `python -I -B tests/run_all.py` on Windows 11 with llvm-mingw: 506 passed, 1 failed, 33 skipped. The one failure, `tests/test_release.py`, fails on main too (#119 fixes it). **Not tested:** Linux. The include is the same relative path `tests/test_bound_keys.py` uses there. **Needs other testers:** None. ## Screenshots Nothing on screen ## Risk and rollback None for the game. Reverting the commit is enough. ## Issues See #137. ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). - [x] Tested in the game, or what wasn't is named under Testing. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [x] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. (Not applicable: a test fixture only.) - [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. ### If applicable - [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)
d4nkn3ss force-pushed fix/test-pad-layout-hold-toggle from c4fcbaea46
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 3s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to bc375c2068
Some checks failed
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
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) Failing after 3s
Website / Website on Cloudflare (pull_request_target) Has been skipped
2026-11-14 01:47:50 +00:00
Compare
Member

Checked on Linux against main cf605c85b: tests/test_pad_layout.py fails there with GCC and with Clang (1 failure each), and with this one-line include merged in it passes with both. This is the one failure every whole-suite run on main has shown since #137, so merging this clears it for everyone's pull requests. Not checked here: Windows.

Checked on Linux against main `cf605c85b`: `tests/test_pad_layout.py` fails there with GCC and with Clang (1 failure each), and with this one-line include merged in it passes with both. This is the one failure every whole-suite run on main has shown since https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/137, so merging this clears it for everyone's pull requests. Not checked here: Windows.
bibiburl approved these changes 2026-11-14 07:18:00 +00:00
bibiburl left a comment

Reviewed bc375c2068 against current main 0caf06184b. No blocking correctness finding in this one-line fixture repair.

The extracted binding table declares HoldToggle, and the added include supplies the actual project definition through the existing gpu/vk include search path. No assertion or product code changes. Independently reproduced the missing-type failure on main, then ran both pad-layout tests successfully at the PR head and with main integrated locally. Merge simulation against current main is clean.

Merge coordination: #338 contains this same include plus the GCC menu-fixture repair. Combining the two currently causes a one-line conflict because only #331 adds a trailing comment. Prefer merging #338 and closing this as covered; if both are retained, keep a single hold_toggle.h include. This approval is for this change on its own, not a recommendation to merge duplicate work.

Scope: focused Linux source/fixture review. No full-suite rerun, Windows run, game build or gameplay measurement by this reviewer. Assisted-by: Codex (OpenAI).

Reviewed bc375c2068d13634d4b3774e84cb1257d9b4bc8d against current main 0caf06184b391a5259d3741bb006ef5826eb6417. No blocking correctness finding in this one-line fixture repair. The extracted binding table declares HoldToggle, and the added include supplies the actual project definition through the existing gpu/vk include search path. No assertion or product code changes. Independently reproduced the missing-type failure on main, then ran both pad-layout tests successfully at the PR head and with main integrated locally. Merge simulation against current main is clean. Merge coordination: #338 contains this same include plus the GCC menu-fixture repair. Combining the two currently causes a one-line conflict because only #331 adds a trailing comment. Prefer merging #338 and closing this as covered; if both are retained, keep a single hold_toggle.h include. This approval is for this change on its own, not a recommendation to merge duplicate work. Scope: focused Linux source/fixture review. No full-suite rerun, Windows run, game build or gameplay measurement by this reviewer. Assisted-by: Codex (OpenAI).
Some checks failed
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
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) Failing after 3s
Website / Website on Cloudflare (pull_request_target) Has been skipped
This pull request has changes conflicting with the target branch.
  • tests/test_pad_layout.py
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/test-pad-layout-hold-toggle:d4nkn3ss-fix/test-pad-layout-hold-toggle'
git switch 'd4nkn3ss-fix/test-pad-layout-hold-toggle'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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!331
No description provided.