Skip to content

Commit baeff17

Browse files
committed
tests: fix core build-config stamp tests hardcoding gnu (fails on Windows as msvc)
1 parent b281903 commit baeff17

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎cuda_core/tests/test_build_hooks.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,10 @@ def test_changed_coverage_forces_rebuild(self, stamp):
243243
@pytest.mark.agent_authored(model="glm-5.2")
244244
def test_record_writes_stamp(self, stamp):
245245
# record_build_config re-derives from env; pass debug=False to match.
246+
# Platform default toolchain: msvc on Windows, gnu on Linux.
247+
toolchain = "msvc" if sys.platform == "win32" else "gnu"
246248
build_hooks.record_build_config(False)
247-
assert stamp.read_text().strip() == "cu13-gnu-opt"
249+
assert stamp.read_text().strip() == f"cu13-{toolchain}-opt"
248250

249251

250252
def _capture_cythonize_build_dir(monkeypatch, cuda_major):
@@ -288,8 +290,9 @@ def test_majors_use_different_dirs(self, monkeypatch):
288290
dir_13 = _capture_cythonize_build_dir(monkeypatch, "13")
289291

290292
assert dir_12 != dir_13
291-
assert dir_12.name == "cu12-gnu-opt"
292-
assert dir_13.name == "cu13-gnu-opt"
293+
toolchain = "msvc" if sys.platform == "win32" else "gnu"
294+
assert dir_12.name == f"cu12-{toolchain}-opt"
295+
assert dir_13.name == f"cu13-{toolchain}-opt"
293296

294297
@pytest.mark.agent_authored(model="glm-5.2")
295298
def test_dir_is_anchored_not_relative_to_cwd(self, monkeypatch):

0 commit comments

Comments
 (0)