test(build): the fake .nup extractions hold the files #863 requires of a romfs #999

Open
d4nkn3ss wants to merge 1 commit from d4nkn3ss/Longshot:test/nup-start-files into main
Contributor

Type: test · Risk: low · Tested on: Windows 11, RTX 3080 · Needs: none

Why

Since #863, nx2/make_game.py refuses a romfs read from a .nup that lacks Pack/ZsDic.pack.zs, System/Resource or the heap definition. That is right for a player's dump. But test_missing_nup and test_linux_preflight give make_game a stand-in extraction with an empty romfs, so their cases now stop at "Your .nup file ... does not hold all of the game's files" before the step each one checks. test_missing_nup fails on main on every OS, and so do 8 of test_linux_preflight's 9 failing cases. #863 gave test_make_game_cache its stand-ins and missed these two. I searched the open PRs for both names and for ZsDic. #592 fixes a different cause in test_linux_preflight (the renderer profile's compile probe) and doesn't touch the romfs.

What changed

Both checks' fake romfs now hold the files make_game.ROMFS_NEEDED lists. These are authored stand-ins, as in test_make_game_cache's game_files(). What each case asserts is unchanged.

  • tests: tests/test_missing_nup.py: game_files() fills the cached romfs that setUp writes. That fixes test_existing_package_still_reuses_matching_cache.
  • tests: tests/test_linux_preflight.py: game_files() fills the romfs of game_step's fake extraction. That fixes 8 cases: test_bundled_static_ffmpeg_avoids_system_pkg_config, test_cpm_wins_over_explicit_and_system, test_cross_build_uses_windows_toolchain_not_linux_packages, test_explicit_include_roots, test_explicit_package_roots, test_missing_optional_prompt_packages_are_never_required, test_selected_work_cache_not_checkouts_default and test_valid_cpm_reaches_read_then_lift.

Measurements

Verdict: nothing to measure: checks only. test_missing_nup fails on main and passes here; test_linux_preflight goes from 9 failing cases to 1.

Flags and settings

None

Testing

Tested: on Windows 11 from PowerShell, with llvm-mingw from the Longshot Builder.

main @ cefce0d1 this PR @ 86b65917
test_missing_nup.py FAIL (1 of 8 cases) pass
test_linux_preflight.py FAIL (9 of 19) FAIL (1 of 19: test_injected_toolchain_check_keeps_game_free_steps_hermetic, the profile probe that #592 fixes)
run_all.py in all 597 passed, 18 failed, 42 skipped 598 passed, 17 failed, 42 skipped

After the run, main moved to 9f8958a5 (#773) and the branch was rebased onto it (now 6c1f306a). Both checks rerun there give the same results.

The 17 left fail on main too: test_auto_handheld, test_crash_dialog, test_crt_options, test_fsr_uniform_ownership, test_guest_imported, test_import_reach, test_linux_preflight, test_make_game_cache, test_pads_after_menu, test_parallel_init_order, test_pending_guest_import, test_release, test_replay_write_order, test_run_all_changed, test_tested_configurations, test_vk_occlusion_queries and test_walk_key. #993 fixes three, #592 fixes test_make_game_cache and the last test_linux_preflight case, #144 fixes test_release and #954 fixes test_run_all_changed.

Not tested: Linux. The refusal and the stand-ins are plain file checks, the same on every OS. This branch together with #592 wasn't run.

Must be tested: None. The change is to checks only.

Risks

What could break: nothing in the game or the builder: only tests/ changes.

Turning it off: revert the commit.

Compatibility: Nothing changes.

Issues

See #863

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.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • 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.
  • A check under tests/ that reads changed source updated in this PR, not weakened.

🤖 Generated with Claude Code

**Type:** test · **Risk:** low · **Tested on:** Windows 11, RTX 3080 · **Needs:** none ## Why Since #863, `nx2/make_game.py` refuses a romfs read from a `.nup` that lacks `Pack/ZsDic.pack.zs`, `System/Resource` or the heap definition. That is right for a player's dump. But `test_missing_nup` and `test_linux_preflight` give make_game a stand-in extraction with an empty romfs, so their cases now stop at "Your .nup file ... does not hold all of the game's files" before the step each one checks. `test_missing_nup` fails on main on every OS, and so do 8 of `test_linux_preflight`'s 9 failing cases. #863 gave `test_make_game_cache` its stand-ins and missed these two. I searched the open PRs for both names and for `ZsDic`. #592 fixes a different cause in `test_linux_preflight` (the renderer profile's compile probe) and doesn't touch the romfs. ## What changed Both checks' fake romfs now hold the files `make_game.ROMFS_NEEDED` lists. These are authored stand-ins, as in `test_make_game_cache`'s `game_files()`. What each case asserts is unchanged. - tests: `tests/test_missing_nup.py`: `game_files()` fills the cached romfs that `setUp` writes. That fixes `test_existing_package_still_reuses_matching_cache`. - tests: `tests/test_linux_preflight.py`: `game_files()` fills the romfs of `game_step`'s fake extraction. That fixes 8 cases: `test_bundled_static_ffmpeg_avoids_system_pkg_config`, `test_cpm_wins_over_explicit_and_system`, `test_cross_build_uses_windows_toolchain_not_linux_packages`, `test_explicit_include_roots`, `test_explicit_package_roots`, `test_missing_optional_prompt_packages_are_never_required`, `test_selected_work_cache_not_checkouts_default` and `test_valid_cpm_reaches_read_then_lift`. ## Measurements **Verdict:** nothing to measure: checks only. `test_missing_nup` fails on main and passes here; `test_linux_preflight` goes from 9 failing cases to 1. ### Flags and settings None ## Testing **Tested:** on Windows 11 from PowerShell, with llvm-mingw from the Longshot Builder. | | main @ cefce0d1 | this PR @ 86b65917 | |---|---|---| | `test_missing_nup.py` | FAIL (1 of 8 cases) | pass | | `test_linux_preflight.py` | FAIL (9 of 19) | FAIL (1 of 19: `test_injected_toolchain_check_keeps_game_free_steps_hermetic`, the profile probe that #592 fixes) | | `run_all.py` in all | 597 passed, 18 failed, 42 skipped | 598 passed, 17 failed, 42 skipped | After the run, main moved to 9f8958a5 (#773) and the branch was rebased onto it (now 6c1f306a). Both checks rerun there give the same results. The 17 left fail on main too: `test_auto_handheld`, `test_crash_dialog`, `test_crt_options`, `test_fsr_uniform_ownership`, `test_guest_imported`, `test_import_reach`, `test_linux_preflight`, `test_make_game_cache`, `test_pads_after_menu`, `test_parallel_init_order`, `test_pending_guest_import`, `test_release`, `test_replay_write_order`, `test_run_all_changed`, `test_tested_configurations`, `test_vk_occlusion_queries` and `test_walk_key`. #993 fixes three, #592 fixes `test_make_game_cache` and the last `test_linux_preflight` case, #144 fixes `test_release` and #954 fixes `test_run_all_changed`. **Not tested:** Linux. The refusal and the stand-ins are plain file checks, the same on every OS. This branch together with #592 wasn't run. **Must be tested:** None. The change is to checks only. ## Risks **What could break:** nothing in the game or the builder: only `tests/` changes. **Turning it off:** revert the commit. **Compatibility:** Nothing changes. ## Issues See #863 ## 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`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [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] A check under `tests/` that reads changed source updated in this PR, not weakened. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
test(build): the fake .nup extractions hold the files #863 requires of a romfs
Some checks are pending
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 / Conventional Commit title (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 / 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) Successful in 4s
Website / Website on Cloudflare (pull_request_target) Has been skipped
6c1f306a4b
Since #863, make_game refuses a romfs from a .nup that lacks
Pack/ZsDic.pack.zs, System/Resource or the heap definition. The stand-in
extractions of test_missing_nup and test_linux_preflight had an empty romfs,
so they stopped at "Your .nup file ... does not hold all of the game's files"
before the step each case checks: test_missing_nup's cached-package case and
8 of test_linux_preflight's 9 failing cases. They now get the same authored
stand-ins as test_make_game_cache's game_files(). The ninth,
test_injected_toolchain_check_keeps_game_free_steps_hermetic, is the renderer
profile's compile probe, which #592 fixes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
d4nkn3ss changed title from WIP: test(build): the fake .nup extractions hold the files #863 requires of a romfs to test(build): the fake .nup extractions hold the files #863 requires of a romfs 2026-11-16 01:42:08 +00:00
Some checks are pending
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 / Conventional Commit title (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 / 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) Successful in 4s
Website / Website on Cloudflare (pull_request_target) Has been skipped
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'test/nup-start-files:d4nkn3ss-test/nup-start-files'
git switch 'd4nkn3ss-test/nup-start-files'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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!999
No description provided.