#6424 [Other] tests: isolate the two SYCL-path drafting tests from a real sibling Strata-data
open · @wronglebowsk · 0 commentaires · Sur GitHub
Setup & installServer & APIMulti-GPUNVIDIA / CUDALinux
Description
Problem and result: `terminal/tests/terminal/test_drafting_sycl_paths.py::SyclContainerPaths::test_a_missing_layer_under_the_mount_is_still_missing` and `::test_the_default_mount_is_the_folder_above_the_checkout` fail on a standard-layout install, where `Strata-data` sits beside the checkout (the layout SOURCE_INSTALL.md describes). The 0.2.17 `_sycl_host_path` fallback tries `STRATA_SYCL_ROOT`, the checkout, and the folder above it, and takes the first root that holds the file: with a real sibling `Strata-data`, both assertions read the real data folder instead of the intended missing-layer / default answer. The tests pass in CI only because CI has no sibling `Strata-data`. This change isolates the checkout in both tests the way `test_a_config_written_before_the_layout_move_is_found_above_the_checkout` already does — a fake `drafting.__file__` in a temp dir — so every fallback root is inside the temp dir. Test-only; no engine or serve change, and `_sycl_host_path` behavior is untouched (it is correct per its docstring). Related discussion: found while gating a v0.2.17 merge on a standard-layout Linux install (the same merge that produced the sm_120 layer-split measurements we can file separately if useful). Happy to open an issue first if preferred. Approach: in the two tests, create `<tmp>/Strata/terminal/strata_control/drafting.py` and `mock.patch.object(drafting, "__file__", ...)` alongside the existing env mocks. The missing-layer test keeps `STRATA_SYCL_ROOT` at the empty temp dir; the default-mount test keeps it cleared. The other three tests are unchanged. Validation: Passed: reproduction on pristine origin/main (3142b66b9), Ubuntu 26.04.1, standard sibling-Strata-data layout: `python -m pytest terminal/tests/terminal/test_drafting_sycl_paths.py -q` -> 2 failed, 3 passed (the two named tests). Passed: with this change, same command -> 5 passed in 0.09s. Passed: the drafting family (`test_drafting_sycl_paths.py`, `test_drafting_mixed_vendor.py`, `test_drafting_switch.py`): 20 passed, 2 failed — both failures pre-existing on pristine main in files this change does not touch (`test_screens`, `test_the_model_list_does_it_when_the_person_changes_model`); they run before the changed file in the same session. Not run: GPU/SYCL hardware execution — not needed for a test-only change with no engine delta; the full terminal suite (this host lacks the optional `rich`/`textual` TUI deps, 23 collection errors unrelated to this change). Limits: the fix makes the two tests hermetic; it does not change which root `_sycl_host_path` answers with on a real install.
Sur le site
Liens install, modèles, releases.