mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #2159] [MERGED] gameinput test: read the pad before expecting a scripted press to end (TEST-GAMEINPUT-SCRIPT-READS) #2163
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2163
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2159
Author: @quartz-heron-58
Created: 11/26/2026
Status: ✅ Merged
Merged: 11/26/2026
Merged by: @aslan2142
Base:
main← Head:gameinput-script-reads📝 Commits (1)
9ea22eagameinput test: read the pad before expecting a scripted press to end (TEST-GAMEINPUT-SCRIPT-READS)📊 Changes
1 file changed (+8 additions, -1 deletions)
View changed files
📝
runtime/test/gameinput_test.cpp(+8 -1)📄 Description
Claimed in the coordination issue as: TEST-GAMEINPUT-SCRIPT-READS (#1608)
Depends on: none. #2152 edits other places of the same test file; the two merge in either order (checked with
git merge-treeagainst main only, not against each other).What and why
ctest
gameinput_script(gameinput_test --input-script) fails on main in every build with SDL3: "10 checks, 1 failures", the failing check being "long script: the timed press ends while the physical key stays held". Here: 3 of 3 runs onc50ed94b3; on33bd07cf8, before #2098, the test passed.#2098 changed
update_keyboard_padso that a scripted press lasts its 300 ms and then until the title has made sixGetCurrentReadingcalls since it began (kReads, at mostkMaxHold= 5 s), so a title that polls slowly still sees it. The test was not changed with it: its last step sleeps 350 ms, polls once and expects the press to be over, with only three reads made since the press began. A build without SDL3 has this test disabled, so CI did not show the failure.This is the test side only. The last step now
No change to
gameinput.cpp. If the six-read rule was not meant to apply this way, the first new check is the one that would say so.Tested
Windows 11 (26300), MSVC Build Tools 2022, RelWithDebInfo,
scripts\build_runtime.ps1 -FetchSdl3on main61732aca1plus this commit: build exit 0.gameinput_script: 5 of 5 runs pass.ctest -R gameinput: 3 of 3 (gameinput_host, gameinput, gameinput_script).gameinput_test.exe --input-script: 11 checks, 0 failures, both new lines PASS.gameinput_scriptfailed onc50ed94b3.scripts/check_no_game_data.pyon the changed file: clean.Not run: the whole ctest set; Linux/Wine. The timing margin was not stressed: the test relies on 350 ms of sleep being past the 300 ms hold, as it did before.
GPUs tested: n/a (no GPU code)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator rule)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.