7
7
import pytest
8
8
import setuptools ._distutils .util
9
9
10
+ from cibuildwheel .util import CIProvider , detect_ci_provider
10
11
from cibuildwheel .windows import PythonConfiguration , setup_setuptools_cross_compile
11
12
12
13
# 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):
50
51
assert target_platform == "win-amd64"
51
52
52
53
54
+ @pytest .mark .skipif (
55
+ detect_ci_provider () == CIProvider .azure_pipelines , reason = "arm64 not recognised on azure"
56
+ )
53
57
def test_arm (tmp_path : Path , monkeypatch : pytest .MonkeyPatch ):
54
58
arch = "ARM64"
55
59
environment : Dict [str , str ] = {}
@@ -66,16 +70,16 @@ def test_arm(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
66
70
67
71
def test_env_set (tmp_path : Path , monkeypatch : pytest .MonkeyPatch ):
68
72
arch = "32"
69
- environment = {"VSCMD_ARG_TGT_ARCH" : "arm64 " }
73
+ environment = {"VSCMD_ARG_TGT_ARCH" : "x64 " }
70
74
71
75
configuration = PythonConfiguration ("irrelevant" , arch , "irrelevant" , None )
72
76
73
77
setup_setuptools_cross_compile (tmp_path , configuration , tmp_path , environment )
74
78
with patched_environment (monkeypatch , environment ):
75
79
target_platform = setuptools ._distutils .util .get_platform ()
76
80
77
- assert environment ["VSCMD_ARG_TGT_ARCH" ] == "arm64 "
78
- assert target_platform == "win-arm64 "
81
+ assert environment ["VSCMD_ARG_TGT_ARCH" ] == "x64 "
82
+ assert target_platform == "win-amd64 "
79
83
80
84
81
85
def test_env_blank (tmp_path : Path , monkeypatch : pytest .MonkeyPatch ):
0 commit comments