Parse all AMD GPU check args (#1586)

This commit is contained in:
red person
2026-06-03 02:56:48 +03:00
committed by GitHub
parent db3a5c17b0
commit e68d0448b8
2 changed files with 34 additions and 13 deletions

View File

@@ -0,0 +1,21 @@
import subprocess
from pathlib import Path
SCRIPT = Path(__file__).resolve().parent.parent / "scripts" / "check-docker-amd-gpu.sh"
def test_amd_gpu_check_rejects_unknown_extra_arg_before_diagnostics():
proc = subprocess.run(
["bash", str(SCRIPT), "--bad-option"],
capture_output=True,
text=True,
check=False,
)
assert proc.returncode == 1
assert "Unknown option: --bad-option" in proc.stderr
def test_amd_gpu_check_shell_syntax():
subprocess.run(["bash", "-n", str(SCRIPT)], check=True)