Skip to content

Commit c8a6e53

Browse files
arm64 fails on azure pipelines (only)
1 parent 552e7a6 commit c8a6e53

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

unit_test/get_platform_test.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import pytest
88
import setuptools._distutils.util
99

10+
from cibuildwheel.util import CIProvider, detect_ci_provider
1011
from cibuildwheel.windows import PythonConfiguration, setup_setuptools_cross_compile
1112

1213
# 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):
5051
assert target_platform == "win-amd64"
5152

5253

54+
@pytest.mark.skipif(
55+
detect_ci_provider() == CIProvider.azure_pipelines, reason="arm64 not recognised on azure"
56+
)
5357
def test_arm(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
5458
arch = "ARM64"
5559
environment: Dict[str, str] = {}
@@ -66,16 +70,16 @@ def test_arm(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
6670

6771
def test_env_set(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
6872
arch = "32"
69-
environment = {"VSCMD_ARG_TGT_ARCH": "arm64"}
73+
environment = {"VSCMD_ARG_TGT_ARCH": "x64"}
7074

7175
configuration = PythonConfiguration("irrelevant", arch, "irrelevant", None)
7276

7377
setup_setuptools_cross_compile(tmp_path, configuration, tmp_path, environment)
7478
with patched_environment(monkeypatch, environment):
7579
target_platform = setuptools._distutils.util.get_platform()
7680

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"
7983

8084

8185
def test_env_blank(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):

0 commit comments

Comments
 (0)