Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
LeoBorcherding
5a94eab6eb Merge remote-tracking branch 'upstream/main' into fix/rocm-version-test-isolation 2026-07-27 18:42:11 -05:00
pre-commit-ci[bot]
3efe941553 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-24 06:48:58 +00:00
Daniel Han
5a6a88adfe test: isolate the no-version gfx-override test from a real /opt/rocm 2026-07-23 23:48:15 -07:00

View file

@ -2242,6 +2242,11 @@ class TestInstallShStructure:
family_fn = _extract_sh_function_body(source, "_amd_arch_index_family_for_gfx")
assert fn and probe_fn and family_fn
with tempfile.TemporaryDirectory() as d:
# Neutralise the host's real ROCm: the version chain reads
# /opt/rocm/.info/version directly (no tool to shim), which resolves
# a tag on a real ROCm box and skips the no-version endpoint under
# test. Same path-substitution technique as the KFD topology tests.
fn = fn.replace("/opt/rocm/.info/version", Path(d, "no-rocm-version").as_posix())
with open(os.path.join(d, "uname"), "w", encoding = "utf-8", newline = "\n") as f:
f.write('#!/bin/sh\ncase "${1:-}" in -m) echo x86_64 ;; *) echo Linux ;; esac\n')
# Silence every ROCm version source, not just amd-smi: a dev box with