WIP: feat(tests): run_all.py --changed runs the checks that read what changed #32
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
needs measurements
question
testing wanted
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!32
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Longshot:feat/run-all-changed"
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?
Why
A full
tests/run_all.pyis about 490 checks and several minutes, and the ones an edit touches had to be picked by hand, which is how a check that cuts a function far from the edit gets missed (AGENTS.md: "Tests read the source").What changed
tests/run_all.py --changed [BASE]:changed_filestakes the files changed since BASE's merge base with HEAD (origin/mainby default), committed or not, plus the untracked ones, from git.reads_changedpicks:import chunks,from chunks import);.pyundertests/that is not a test changed.--changed, the C++ unit tests run only when something undergpu/changed or every check runs. It prints how many files changed and how many checks read them, and that a pull request still needs the whole run.--changedcan't be combined with names or--write-times. Nothing else in the runner changes.tests/test_run_all_changed.py(new): which checks a changed file picks (by path, by name and not inside a longer name, by import), that a changed check runs itself, that the runner or a shared test file runs everything, that an unnamed file runs none, and the files from git (committed, uncommitted and untracked), with git's answers stood in.Example, on the GitHub branch (the runner changed):
--changed: 2 files changed since origin/main, every check (the runner or a shared test file changed). For a change tonx2/chunks.pyalone it picks the chunk, emit and lift-cache checks (under a quarter of all), not the renderer's.Flags and settings
None: no environment switch, menu row or ini key. The new
tests/run_all.py --changed [BASE]option is the test runner's, described above.Measurements
Nothing to measure in the game: the change is a test-runner option, and no game or renderer code changes. What was run, on the GitHub version (NotRexed/Hookshot#2887), Windows:
run_all.py --changed origin/mainon that branch: every check, as the runner changed: 423 passed, 21 failed, 79 skipped. The 21 fail the same way on GitHub'smainon the same PC (its compilers and Linux-only checks).test_spawn_emit, which fails the same way onmainthere.Testing
Tested: the runs under Measurements (on the GitHub version) and the game-free checks this description names. Checked but not measured: the runs above.
Not tested: no gaps are named in the GitHub description; every run it records was on Windows.
Needs other testers: None
Screenshots
Nothing on screen.
Risk and rollback
Only
--changedpicks checks; a run without it is unchanged. A check that reads a file without naming it (by path, name or import) would be left out of a--changedrun, which is why it says a pull request still needs the whole run. Reverting the commit is enough.Reviewer notes
Carried over from NotRexed/Hookshot#2887 with the move to Longshot: the same change on Longshot's
main, with its rename applied. Its review and discussion are there.The checks were done on the GitHub version; this branch is the same change with the rename applied (the same files and line counts). Forgejo runs no checks; they were not run again here. The whole suite ran there (423 passed, 21 failed, 79 skipped), but the 21 failures are not named one by one, so the run_all.py box is left open. The dev-loop proposal's D1 (NotRexed/Hookshot#2636).
Issues
None on Longshot. See NotRexed/Hookshot#2636 (D1).
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.docs/tested-configurations.mdfor each measured run.MKWVK_API_VERSIONbumped (gpu/vk/vk_api.h'sMkwVkHostorMkwVkRendererchanged).mainand passing here.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
feat(tests): run_all.py --changed runs the checks that read what changedto WIP: feat(tests): run_all.py --changed runs the checks that read what changedBack to WIP under #48's process: this was carried over before the new template. Its description will be brought to the template and measured on Longshot (main against this PR, at named commits) when it's wanted for review; ask here if you'd like it sooner.
Description brought to Longshot's PR template (#48). Still WIP: its numbers are from the GitHub version, and it isn't rebased on current main; it gets measured on Longshot (main against this PR, at named commits) before it is marked ready.
Description moved to the template's Testing section and whole checklist (#72): what was tested, what wasn't, and what needs other testers (their test requests to open while this is WIP).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.