mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4138] [Other] run the test suites on a Mac: name the PC each fake engine package is built for #4916
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4916
Loading…
Add table
Add a link
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/Niko1221/Strata/pull/4138
Author: @sergrefraction
Created: 10/25/2026
Status: 🔄 Open
Base:
main← Head:tests-macos-fixes📝 Commits (3)
ed75608[Tests] run the setup and host suites on a Mac19c215d[Tests] name the PC the fake engine packages are built for3428909[Tests] ask the product where its own settings file is📊 Changes
15 files changed (+238 additions, -109 deletions)
View changed files
📝
apps/host/tests/chat-files.test.mjs(+2 -2)📝
apps/host/tests/helpers/native-fixture.mjs(+2 -2)📝
apps/host/tests/packaged-control.test.mjs(+8 -6)📝
tests/terminal/test_archive_gaps.py(+4 -4)📝
tests/terminal/test_component_start.py(+26 -15)📝
tests/terminal/test_discovery.py(+24 -3)📝
tests/terminal/test_engine_component.py(+57 -32)📝
tests/terminal/test_engine_manifest.py(+13 -6)📝
tests/terminal/test_shared_models_folder.py(+1 -1)📝
tests/terminal/test_updater.py(+24 -19)📝
tests/terminal/update_fixture.py(+49 -8)📝
tools/test_setup_choices.py(+3 -0)📝
tools/test_setup_golden.py(+9 -1)📝
tools/test_setup_unsloth.py(+7 -4)📝
tools/test_setup_update.py(+9 -6)📄 Description
Problem and resulting behaviour
Every test in
tests/terminal,tools/test_setup_*.pyandapps/host/teststhat builds a throwaway engine package failed on Apple Silicon, and 105 of the Terminal tests failed in total. The code under test is fine: the tests build a CUDA or HIP package and then ask the resolver to use it here, and the resolver drops a package whose platform this machine does not take before the rule the test is about is reached. A Mac takes Metal, and the tests never said which PC they were talking about.After this change the same tests pass on a Mac, and on Windows and Linux they name this machine, so those runs are unchanged by construction.
Approach
tests/terminal/update_fixture.py: the shared package builder names the engine family and the folder tag of the machine running the test (metal/apple-gpuon a Mac,cuda/cuda13elsewhere). Cases that are about CUDA code for another card name a CUDA PC themselves.tests/terminal/test_engine_component.py,test_engine_manifest.py,test_archive_gaps.py: one PC constant per file. Packages are built for it,resolveis asked about it, and where the production code asks this machine which GPU family it takes, the test points that probe at the PC it is speaking about (per test, withaddCleanup, never at import time).tests/terminal/test_updater.py: each case reads its own family and folder tag instead of assumingcuda; the runtime-library check accepts the Metal library as well.tests/terminal/test_component_start.py: the stub engine is one this machine takes, and carries a picture reader on a Mac, wherepackaging/package_engine.pyrefuses a macOS package without one (#3697).tools/test_setup_*.py:setup.pyhands a Mac run tometal/setup_mac.pybefore it reads its arguments (setup.py:8418), so every harness that drovesetup.main()through the CUDA/Windows path got exit 2 and an empty log. The harness now patchessys.platformfor those runs, only when it is a Mac. The golden baseline stored the vision file asstrata-vision.exe; on a Mac and on Linux the name has no.exe, so all 48 comparisons differed — the baseline and the new run now go through the same name rule.test_setup_choicesalso ran a realpip install rocm[...], which broke the rule that setup tests run without a GPU or downloads.apps/host/tests/*: on macOS/varis a link to/private/varand the host resolves it, so three tests that compared a temp path as written now compare the resolved path.No production file is touched: only test files and test fixtures.
Validation
Measured on this machine (Apple M2 Max, macOS 26.6.2, Python 3.15),
python -m pytest tests/terminal:~/Documents, process handling, the launch warnings) and are not addressed here.test_updater.py19 failed → 40 passed;test_engine_component.py18 → 39 passed and 1 skipped;test_engine_manifest.py8 → 23 passed;test_component_start.py6 → 8 passed;test_archive_gaps.py1 → 0. Together: 120 passed, 2 skipped, 0 failed.update_fixture.py: 158 passed, 12 skipped, 0 failed.python tools/test_setup_<name>.py(the setup suite): 49 of 49 pass.npm testinapps/host: passes on this Mac.Not run: Windows and Linux. The changes are no-ops there by construction (the PC named is this machine), but they have not been executed on either. No GPU was used and nothing was downloaded.
Scope
No production behaviour, no default and no file a user runs is changed, so no scope-agreement issue was opened. If you would rather have one first, say so and this can wait behind it.
Limits
taskkill, long paths, the installer), 10 are Docker images built for other platforms, and the rest need a GPU, a second card, a real installer orSTRATA_VISION_GGUF_TEST.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.