Skip ARM64 test run when not running on ARM64

This commit is contained in:
Steve Dower
2022-08-25 00:30:38 +01:00
parent dcc5c00a3d
commit 9e07dae579
+11
View File
@@ -1,6 +1,7 @@
from __future__ import annotations
import os
import platform
import subprocess
import textwrap
@@ -71,6 +72,13 @@ class TestSpam(TestCase):
'''
ADD_ENV = {}
if utils.platform == "windows":
if platform.machine() != "ARM64":
ADD_ENV["CIBW_TEST_SKIP"] = "*-win_arm64 " + ADD_ENV.get("CIBW_TEST_SKIP", "")
def test(tmp_path):
project_dir = tmp_path / "project"
project_with_a_test.generate(project_dir)
@@ -84,6 +92,7 @@ def test(tmp_path):
# mac/linux.
"CIBW_TEST_COMMAND": "false || pytest {project}/test",
"CIBW_TEST_COMMAND_WINDOWS": "COLOR 00 || pytest {project}/test",
**ADD_ENV,
},
)
@@ -105,6 +114,7 @@ def test_extras_require(tmp_path):
# mac/linux.
"CIBW_TEST_COMMAND": "false || pytest {project}/test",
"CIBW_TEST_COMMAND_WINDOWS": "COLOR 00 || pytest {project}/test",
**ADD_ENV,
},
)
@@ -142,6 +152,7 @@ def test_failing_test(tmp_path):
# problems with this, so let's check that.
"CIBW_MANYLINUX_I686_IMAGE": "manylinux1",
"CIBW_MANYLINUX_X86_64_IMAGE": "manylinux1",
**ADD_ENV,
},
)