test: three checks run or skip by what the PC has, instead of failing without it #628

Merged
HumanBean merged 1 commit from zeldaootr/Longshot:checks-declare-missing-needs into main 2026-11-16 01:16:44 +00:00
Contributor

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, numpy or a clang++ they make tests/run_all.py red 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 zstandard or numpy; g++ but no clang++ on PATH
Settings and switches: none; LONGSHOT_VULKAN_HEADERS set for the runner
Steps: on main aa95d35f, run python -I -B tests/run_all.py test_bake_portability test_lift_cache test_texture_init_barrier
Expected: 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, through nx2/adr_entries.py); FileNotFoundError: [Errno 2] No such file or directory: 'clang++' (test_texture_init_barrier, which defaults to clang++ 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 its import zstandard; the runner skips it without that module, as it does test_native_zstd.py.
  • tests/test_lift_cache.py: numpy is stood in, as capstone and lz4 already are, where it is not installed, for the import of the lift's two scripts. adr_entries.py uses 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_ARGS passes --cxx {cxx}, so it gets the runner's compiler (and is skipped without one) instead of its clang++ 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 on PATH as clang++), Python 3.15
Scene: no game: the game-free checks
Method: test_bake_portability and test_texture_init_barrier through the runner, test_lift_cache alone (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 branch test_texture_init_barrier also alone with --cxx g++ and with the clang above
How to reproduce: python -I -B tests/run_all.py test_bake_portability test_lift_cache test_texture_init_barrier on each commit

Before: main @ aa95d35f After: this PR @ 00cb5e61
Failed / passed / skipped of 3, round 1 3 / 0 / 0 0 / 2 / 1
Failed / passed / skipped of 3, round 2 3 / 0 / 0 0 / 2 / 1
main@aa95d35f:   FAIL tests/test_bake_portability.py   FAIL nx2/test_texture_init_barrier.py   (test_lift_cache alone: ModuleNotFoundError: No module named 'numpy')
this PR@00cb5e61: pass tests/test_lift_cache.py   pass nx2/test_texture_init_barrier.py   skip tests/test_bake_portability.py  (not found here: zstandard)
checks-declare-missing-needs@00cb5e61 r2 test_texture_init_barrier.py clangxx rc=0 | PASS: actual create initialization orders colour/depth clears before dependent commands; BC/ASTC excluded

Flags 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 main 6c9edffe at 59c18065); test_texture_init_barrier with g++ and clang. The full suite (python -I -B tests/run_all.py, Linux, LONGSHOT_VULKAN_HEADERS set) on main 6c9edffe with 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 main aa95d35f, the commit re-authored under the forge's noreply address: its change is identical to before by git patch-id; on aa95d35f the three also ran through the runner with g++ 13.3 and with clang 23.1.5: 3 fail on main, and here 2 pass and test_bake_portability skips (no zstandard).

Not tested: test_bake_portability itself, which needs zstandard (not installed here; the change only adds its declaration). A PC with numpy installed takes the real module in test_lift_cache, as before.

Must be tested: None

Risks

What could break: a PC without zstandard now skips test_bake_portability instead of failing it: the runner's --strict still fails it there.

Turning it off: revert the commit

Compatibility: Nothing changes

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. Onto main 94abdd57 (head fad820d1) 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 by git patch-id. The commits named in this description are from before this rebase: 00cb5e61 is now fad820d1. Re-run on 94abdd57: test_lift_cache and test_texture_init_barrier fail on main 94abdd57 and pass here, with g++ 13.3 and clang 23.1.5; test_bake_portability fails on main and skips here (no zstandard on this PC), as it should.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named). The full run is the one in Testing, on main 6c9edffe; after the rebase onto aa95d35f, the changed checks through the runner with g++ and clang, as above.
  • 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.
  • Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
**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`, `numpy` or a `clang++` they make `tests/run_all.py` red 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 `zstandard` or `numpy`; g++ but no `clang++` on `PATH` **Settings and switches:** none; `LONGSHOT_VULKAN_HEADERS` set for the runner **Steps:** on `main` aa95d35f, run `python -I -B tests/run_all.py test_bake_portability test_lift_cache test_texture_init_barrier` **Expected:** 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`, through `nx2/adr_entries.py`); `FileNotFoundError: [Errno 2] No such file or directory: 'clang++'` (`test_texture_init_barrier`, which defaults to `clang++` 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 its `import zstandard`; the runner skips it without that module, as it does `test_native_zstd.py`. - `tests/test_lift_cache.py`: `numpy` is stood in, as `capstone` and `lz4` already are, where it is not installed, for the import of the lift's two scripts. `adr_entries.py` uses 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_ARGS` passes `--cxx {cxx}`, so it gets the runner's compiler (and is skipped without one) instead of its `clang++` 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 on `PATH` as `clang++`), Python 3.15 Scene: no game: the game-free checks Method: `test_bake_portability` and `test_texture_init_barrier` through the runner, `test_lift_cache` alone (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 branch `test_texture_init_barrier` also alone with `--cxx g++` and with the clang above How to reproduce: `python -I -B tests/run_all.py test_bake_portability test_lift_cache test_texture_init_barrier` on each commit | | Before: main @ aa95d35f | After: this PR @ 00cb5e61 | |---|---|---| | Failed / passed / skipped of 3, round 1 | 3 / 0 / 0 | 0 / 2 / 1 | | Failed / passed / skipped of 3, round 2 | 3 / 0 / 0 | 0 / 2 / 1 | ``` main@aa95d35f: FAIL tests/test_bake_portability.py FAIL nx2/test_texture_init_barrier.py (test_lift_cache alone: ModuleNotFoundError: No module named 'numpy') this PR@00cb5e61: pass tests/test_lift_cache.py pass nx2/test_texture_init_barrier.py skip tests/test_bake_portability.py (not found here: zstandard) checks-declare-missing-needs@00cb5e61 r2 test_texture_init_barrier.py clangxx rc=0 | PASS: actual create initialization orders colour/depth clears before dependent commands; BC/ASTC excluded ``` ### Flags 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 main 6c9edffe at 59c18065); `test_texture_init_barrier` with g++ and clang. The full suite (`python -I -B tests/run_all.py`, Linux, `LONGSHOT_VULKAN_HEADERS` set) on main 6c9edffe with 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` (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/497), `tests/test_cpm_discovery.py` (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/561), `tests/test_make_game_cache.py` (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/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 main aa95d35f, the commit re-authored under the forge's noreply address: its change is identical to before by `git patch-id`; on aa95d35f the three also ran through the runner with g++ 13.3 and with clang 23.1.5: 3 fail on main, and here 2 pass and `test_bake_portability` skips (no zstandard). **Not tested:** `test_bake_portability` itself, which needs `zstandard` (not installed here; the change only adds its declaration). A PC with `numpy` installed takes the real module in `test_lift_cache`, as before. **Must be tested:** None ## Risks **What could break:** a PC without `zstandard` now skips `test_bake_portability` instead of failing it: the runner's `--strict` still fails it there. **Turning it off:** revert the commit **Compatibility:** Nothing changes ## 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`. Onto main 94abdd57 (head fad820d1) 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 (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/417); each commit's change is the same as before by `git patch-id`. The commits named in this description are from before this rebase: 00cb5e61 is now fad820d1. Re-run on 94abdd57: `test_lift_cache` and `test_texture_init_barrier` fail on main 94abdd57 and pass here, with g++ 13.3 and clang 23.1.5; `test_bake_portability` fails on main and skips here (no `zstandard` on this PC), as it should. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). The full run is the one in Testing, on main 6c9edffe; after the rebase onto aa95d35f, the changed checks through the runner with g++ and clang, as above. - [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] Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
three checks say what they need instead of failing without it
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 4s
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
59c18065ea
- `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: Claude
zeldaootr force-pushed checks-declare-missing-needs from 59c18065ea
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 4s
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 00cb5e618b
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 6s
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
Guide screenshots / Guide images and local UI source review (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
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-15 17:13:12 +00:00
Compare
Author
Contributor

Rebased onto main aa95d35f (head 00cb5e61); the commits are re-authored with the forge's noreply address: no code change, the same patches by git patch-id.
Tests re-run: the three fail on main aa95d35f and here 2 pass and test_bake_portability skips (no zstandard), two interleaved rounds through the runner, test_texture_init_barrier with g++ and clang; the description names the new commit.

Rebased onto `main` aa95d35f (head 00cb5e61); the commits are re-authored with the forge's noreply address: no code change, the same patches by `git patch-id`. Tests re-run: the three fail on main aa95d35f and here 2 pass and `test_bake_portability` skips (no zstandard), two interleaved rounds through the runner, `test_texture_init_barrier` with g++ and clang; the description names the new commit.
zeldaootr force-pushed checks-declare-missing-needs from 00cb5e618b
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 6s
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
Guide screenshots / Guide images and local UI source review (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
Website / Website on Cloudflare (pull_request) Has been cancelled
to fad820d1e1
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 / The same as upstream (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 4s
Website / Website on Cloudflare (pull_request_target) Has been skipped
2026-11-15 19:16:07 +00:00
Compare
Author
Contributor

Rebased onto main 94abdd57 (head fad820d1), 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 by git patch-id.
Re-run on 94abdd57: test_lift_cache and test_texture_init_barrier fail on main 94abdd57 and pass here, with g++ 13.3 and clang 23.1.5; test_bake_portability fails on main and skips here (no zstandard on this PC), as it should. The description names the new commits.

Rebased onto `main` 94abdd57 (head fad820d1), with no conflict; the commit subjects are now Conventional Commits, which CircleCI's lint job checks for every commit of a pull request (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/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 by `git patch-id`. Re-run on 94abdd57: `test_lift_cache` and `test_texture_init_barrier` fail on main 94abdd57 and pass here, with g++ 13.3 and clang 23.1.5; `test_bake_portability` fails on main and skips here (no `zstandard` on this PC), as it should. The description names the new commits.
HumanBean approved these changes 2026-11-16 01:08:12 +00:00
HumanBean left a comment

Read the whole diff (3 files, +4/-3); nothing run.

  • nx2/test_texture_init_barrier.py: RUN_ALL_ARGS now passes --cxx {cxx}. {cxx} is a placeholder tests/run_all.py knows, 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-coded clang++ default.
  • tests/test_bake_portability.py: RUN_ALL_MODULES = ["zstandard"] matches the file's top-level import zstandard, so a PC without it skips the check, and --strict still fails it.
  • tests/test_lift_cache.py: numpy joins 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.py documents. The description is complete, and its Linux run is on both g++ and clang. No overlap with the sibling PRs beyond tests/test_lift_cache.py, where the hunk is a single line in check_lift_sources.

Read the whole diff (3 files, +4/-3); nothing run. - `nx2/test_texture_init_barrier.py`: `RUN_ALL_ARGS` now passes `--cxx {cxx}`. `{cxx}` is a placeholder `tests/run_all.py` knows, 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-coded `clang++` default. - `tests/test_bake_portability.py`: `RUN_ALL_MODULES = ["zstandard"]` matches the file's top-level `import zstandard`, so a PC without it skips the check, and `--strict` still fails it. - `tests/test_lift_cache.py`: `numpy` joins 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.py` documents. The description is complete, and its Linux run is on both g++ and clang. No overlap with the sibling PRs beyond `tests/test_lift_cache.py`, where the hunk is a single line in `check_lift_sources`.
HumanBean deleted branch checks-declare-missing-needs 2026-11-16 01:16:44 +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 / The same as upstream (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 4s
Website / Website on Cloudflare (pull_request_target) Has been skipped
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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!628
No description provided.