test: three checks run or skip by what the PC has, instead of failing without it #628
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!628
Loading…
Reference in a new issue
No description provided.
Delete branch "zeldaootr/Longshot:checks-declare-missing-needs"
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?
Type: test · Risk: low · Tested on: Linux, no GPU (game-free checks, no zstandard, numpy or clang++ installed) · Needs: none
Why
Three game-free checks fail on a PC that lacks a module or compiler they need, where the runner's rule (CONTRIBUTING.md, "Testing") is to skip such a check and say so. On a Linux PC without
zstandard,numpyor aclang++they maketests/run_all.pyred for something that is not a fault, and hide real failures among them. All three predate today's merges; no open pull request or claim covers them.How to reproduce
Seen on: Linux (Ubuntu 24.04), no GPU; Python 3.15 without
zstandardornumpy; g++ but noclang++onPATHSettings and switches: none;
LONGSHOT_VULKAN_HEADERSset for the runnerSteps: on
mainaa95d35f, runpython -I -B tests/run_all.py test_bake_portability test_lift_cache test_texture_init_barrierExpected: each passes, or is skipped naming what is missing
Actual: all three fail:
ModuleNotFoundError: No module named 'zstandard'(test_bake_portability);FAIL: the lift's scripts import (... ModuleNotFoundError: No module named 'numpy')(test_lift_cache, throughnx2/adr_entries.py);FileNotFoundError: [Errno 2] No such file or directory: 'clang++'(test_texture_init_barrier, which defaults toclang++and is given no compiler)What changed
Each check says what it needs in the runner's own terms, or stands in for a module the code it checks only imports. No product file changes.
tests/test_bake_portability.py:RUN_ALL_MODULES = ["zstandard"]for itsimport zstandard; the runner skips it without that module, as it doestest_native_zstd.py.tests/test_lift_cache.py:numpyis stood in, ascapstoneandlz4already are, where it is not installed, for the import of the lift's two scripts.adr_entries.pyuses it inside functions only, and the check is about which of Longshot's own modules the lift imports, so it keeps running everywhere rather than being skipped.nx2/test_texture_init_barrier.py:RUN_ALL_ARGSpasses--cxx {cxx}, so it gets the runner's compiler (and is skipped without one) instead of itsclang++default.Measurements
Verdict: passes: on this PC the three go from 3 failed to 2 passed and 1 skipped (zstandard) through the runner, in two interleaved rounds.
Hardware: Linux (Ubuntu 24.04, kernel 6.8), x86-64, no GPU used; g++ 13.3.0, clang 23.1.5 (llvm-mingw's,
--target=x86_64-linux-gnu, not onPATHasclang++), Python 3.15Scene: no game: the game-free checks
Method:
test_bake_portabilityandtest_texture_init_barrierthrough the runner,test_lift_cachealone (it declares nothing, so the runner starts it the same way), round 1 on main then this branch, round 2 the same again; on this branchtest_texture_init_barrieralso alone with--cxx g++and with the clang aboveHow to reproduce:
python -I -B tests/run_all.py test_bake_portability test_lift_cache test_texture_init_barrieron each commitaa95d35f00cb5e61Flags and settings
None
Testing
Tested: on Linux, the three through the runner and alone, two interleaved rounds against main
aa95d35f(before this rebase, the same against main6c9edffeat59c18065);test_texture_init_barrierwith g++ and clang. The full suite (python -I -B tests/run_all.py, Linux,LONGSHOT_VULKAN_HEADERSset) on main6c9edffewith this and the six other red-check repairs from the same sweep merged locally (1ba90202, not pushed): 525 passed, 4 failed, 51 skipped. Three of the failures fail on main too and have their own pull requests:tests/test_walk_key.py(#497),tests/test_cpm_discovery.py(#561),tests/test_make_game_cache.py(#592). The fourth,tests/test_crash_record.py, timed out waiting 10 s for a signalled child under load and passes alone, twice. Rebased since onto mainaa95d35f, the commit re-authored under the forge's noreply address: its change is identical to before bygit patch-id; onaa95d35fthe three also ran through the runner with g++ 13.3 and with clang 23.1.5: 3 fail on main, and here 2 pass andtest_bake_portabilityskips (no zstandard).Not tested:
test_bake_portabilityitself, which needszstandard(not installed here; the change only adds its declaration). A PC withnumpyinstalled takes the real module intest_lift_cache, as before.Must be tested: None
Risks
What could break: a PC without
zstandardnow skipstest_bake_portabilityinstead of failing it: the runner's--strictstill fails it there.Turning it off: revert the commit
Compatibility: Nothing changes
Checklist
Everyone
type(scope): description) of the status line's type.main. Onto main94abdd57(headfad820d1) with no conflict, with the commit subjects made Conventional Commits, which CI's lint job now checks for every commit, on a base that has CI's config (#417); each commit's change is the same as before bygit patch-id. The commits named in this description are from before this rebase:00cb5e61is nowfad820d1. Re-run on94abdd57:test_lift_cacheandtest_texture_init_barrierfail on main94abdd57and pass here, with g++ 13.3 and clang 23.1.5;test_bake_portabilityfails on main and skips here (nozstandardon this PC), as it should.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). The full run is the one in Testing, on main6c9edffe; after the rebase ontoaa95d35f, the changed checks through the runner with g++ and clang, as above.third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.- `test_bake_portability` imports `zstandard`: `RUN_ALL_MODULES`, so the runner skips it where it is not installed - `test_lift_cache` imports the lift, whose `adr_entries` imports `numpy` (used in functions only): stood in like capstone and lz4 - `test_texture_init_barrier` defaulted to `clang++` with no `{cxx}` in `RUN_ALL_ARGS`: it now gets the runner's compiler Assisted-by: Claude59c18065ea00cb5e618bRebased onto
mainaa95d35f(head00cb5e61); the commits are re-authored with the forge's noreply address: no code change, the same patches bygit patch-id.Tests re-run: the three fail on main
aa95d35fand here 2 pass andtest_bake_portabilityskips (no zstandard), two interleaved rounds through the runner,test_texture_init_barrierwith g++ and clang; the description names the new commit.00cb5e618bfad820d1e1Rebased onto
main94abdd57(headfad820d1), with no conflict; the commit subjects are now Conventional Commits, which CircleCI's lint job checks for every commit of a pull request (#417), and the base has the CI's config, which a fork's pull request needs at its own head. No other change: each commit's change is the same as before bygit patch-id.Re-run on
94abdd57:test_lift_cacheandtest_texture_init_barrierfail on main94abdd57and pass here, with g++ 13.3 and clang 23.1.5;test_bake_portabilityfails on main and skips here (nozstandardon this PC), as it should. The description names the new commits.Read the whole diff (3 files, +4/-3); nothing run.
nx2/test_texture_init_barrier.py:RUN_ALL_ARGSnow passes--cxx {cxx}.{cxx}is a placeholdertests/run_all.pyknows, and the check's argparse takes--cxx, so the runner now gives it the compiler it found (and skips the check when there is none) instead of the hard-codedclang++default.tests/test_bake_portability.py:RUN_ALL_MODULES = ["zstandard"]matches the file's top-levelimport zstandard, so a PC without it skips the check, and--strictstill fails it.tests/test_lift_cache.py:numpyjoins the stubbed modules in the import-walk subprocess, with the docstring updated. Stubbing happens only when the real import fails, so a PC with numpy still imports the real one.The declarations are plain literals in the form
run_all.pydocuments. The description is complete, and its Linux run is on both g++ and clang. No overlap with the sibling PRs beyondtests/test_lift_cache.py, where the hunk is a single line incheck_lift_sources.