| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| def test_bootstrap_requires_exact_rocm_version() -> None: | |
| script = (ROOT / "scripts/bootstrap-rocm.sh").read_text(encoding="utf-8") | |
| assert '[[ $HOST_ROCM != "$ROCM_RELEASE" ]]' in script | |
| assert "[[ $HOST_ROCM != 7.2.1* ]]" not in script | |
| def test_bootstrap_uses_hash_lock_and_local_wheel() -> None: | |
| script = (ROOT / "scripts/bootstrap-rocm.sh").read_text(encoding="utf-8") | |
| assert "--require-hashes --only-binary=:all:" in script | |
| assert "pip wheel --no-build-isolation --no-deps" in script | |
| assert "pip install --force-reinstall --no-deps" in script | |
| assert "pip install --upgrade" not in script | |