Skip to content

Commit

Permalink
arm64 fails on azure pipelines (only)
Browse files Browse the repository at this point in the history
  • Loading branch information
MusicalNinjaDad committed Jun 14, 2024
1 parent 552e7a6 commit c8a6e53
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions unit_test/get_platform_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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] = {}
Expand All @@ -66,16 +70,16 @@ 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)

setup_setuptools_cross_compile(tmp_path, configuration, tmp_path, environment)
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):
Expand Down

0 comments on commit c8a6e53

Please sign in to comment.