diff --git a/unit_test/get_platform_test.py b/unit_test/get_platform_test.py index c3d00b4a3..d5e609bcf 100644 --- a/unit_test/get_platform_test.py +++ b/unit_test/get_platform_test.py @@ -7,6 +7,7 @@ import pytest import setuptools._distutils.util +from cibuildwheel.util import CIProvider, detect_ci_provider from cibuildwheel.windows import PythonConfiguration, setup_setuptools_cross_compile # monkeypatching os.name is too flaky. E.g. It works on my machine, but fails in pipeline @@ -50,6 +51,9 @@ def test_x64(tmp_path: Path, monkeypatch: pytest.MonkeyPatch): assert target_platform == "win-amd64" +@pytest.mark.skipif( + detect_ci_provider() == CIProvider.azure_pipelines, reason="arm64 not recognised on azure" +) def test_arm(tmp_path: Path, monkeypatch: pytest.MonkeyPatch): arch = "ARM64" environment: Dict[str, str] = {} @@ -66,7 +70,7 @@ def test_arm(tmp_path: Path, monkeypatch: pytest.MonkeyPatch): def test_env_set(tmp_path: Path, monkeypatch: pytest.MonkeyPatch): arch = "32" - environment = {"VSCMD_ARG_TGT_ARCH": "arm64"} + environment = {"VSCMD_ARG_TGT_ARCH": "x64"} configuration = PythonConfiguration("irrelevant", arch, "irrelevant", None) @@ -74,8 +78,8 @@ def test_env_set(tmp_path: Path, monkeypatch: pytest.MonkeyPatch): with patched_environment(monkeypatch, environment): target_platform = setuptools._distutils.util.get_platform() - assert environment["VSCMD_ARG_TGT_ARCH"] == "arm64" - assert target_platform == "win-arm64" + assert environment["VSCMD_ARG_TGT_ARCH"] == "x64" + assert target_platform == "win-amd64" def test_env_blank(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):