From 6e43c93634e2ea4fb55b5448109573ff036395e9 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Fri, 9 Aug 2024 13:20:04 -0600 Subject: [PATCH] Use updated pytest-skip-markers to pick up corrected MacOS Arm64 support --- requirements/pytest.txt | 2 ++ requirements/static/ci/py3.10/cloud.txt | 3 ++- requirements/static/ci/py3.10/darwin.txt | 3 ++- requirements/static/ci/py3.10/freebsd.txt | 3 ++- requirements/static/ci/py3.10/linux.txt | 3 ++- requirements/static/ci/py3.10/windows.txt | 3 ++- requirements/static/ci/py3.11/cloud.txt | 3 ++- requirements/static/ci/py3.11/darwin.txt | 3 ++- requirements/static/ci/py3.11/freebsd.txt | 3 ++- requirements/static/ci/py3.11/linux.txt | 3 ++- requirements/static/ci/py3.11/windows.txt | 3 ++- requirements/static/ci/py3.12/cloud.txt | 3 ++- requirements/static/ci/py3.12/darwin.txt | 3 ++- requirements/static/ci/py3.12/freebsd.txt | 3 ++- requirements/static/ci/py3.12/linux.txt | 3 ++- requirements/static/ci/py3.12/windows.txt | 3 ++- requirements/static/ci/py3.7/cloud.txt | 3 ++- requirements/static/ci/py3.7/freebsd.txt | 3 ++- requirements/static/ci/py3.7/linux.txt | 3 ++- requirements/static/ci/py3.7/windows.txt | 3 ++- requirements/static/ci/py3.8/cloud.txt | 3 ++- requirements/static/ci/py3.8/freebsd.txt | 3 ++- requirements/static/ci/py3.8/linux.txt | 3 ++- requirements/static/ci/py3.8/windows.txt | 3 ++- requirements/static/ci/py3.9/cloud.txt | 3 ++- requirements/static/ci/py3.9/darwin.txt | 3 ++- requirements/static/ci/py3.9/freebsd.txt | 3 ++- requirements/static/ci/py3.9/linux.txt | 3 ++- requirements/static/ci/py3.9/windows.txt | 3 ++- salt/utils/platform.py | 23 +++++------------------ tests/support/pkg.py | 19 ++----------------- 31 files changed, 65 insertions(+), 63 deletions(-) diff --git a/requirements/pytest.txt b/requirements/pytest.txt index ce8b9569125d..82dd91389585 100644 --- a/requirements/pytest.txt +++ b/requirements/pytest.txt @@ -13,3 +13,5 @@ flaky more-itertools pyfakefs trustme +pytest-skip-markers >= 1.5.2 ; python_version >= '3.8' +pytest-skip-markers <= 1.5.1 ; python_version < '3.8' diff --git a/requirements/static/ci/py3.10/cloud.txt b/requirements/static/ci/py3.10/cloud.txt index ac9e868a1dc7..b64e1117dc19 100644 --- a/requirements/static/ci/py3.10/cloud.txt +++ b/requirements/static/ci/py3.10/cloud.txt @@ -482,9 +482,10 @@ pytest-shell-utilities==1.8.0 # via # -c requirements/static/ci/py3.10/linux.txt # pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.10/linux.txt + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.10/darwin.txt b/requirements/static/ci/py3.10/darwin.txt index 1fcec03349a1..e5818d707bcb 100644 --- a/requirements/static/ci/py3.10/darwin.txt +++ b/requirements/static/ci/py3.10/darwin.txt @@ -337,8 +337,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.10/freebsd.txt b/requirements/static/ci/py3.10/freebsd.txt index 695496a31fc6..8df94c0cf59a 100644 --- a/requirements/static/ci/py3.10/freebsd.txt +++ b/requirements/static/ci/py3.10/freebsd.txt @@ -330,8 +330,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.10/linux.txt b/requirements/static/ci/py3.10/linux.txt index 2d58958d020a..e2142dcaa6b7 100644 --- a/requirements/static/ci/py3.10/linux.txt +++ b/requirements/static/ci/py3.10/linux.txt @@ -347,8 +347,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.10/windows.txt b/requirements/static/ci/py3.10/windows.txt index c3d2ca7db3da..ae774c8c5da2 100644 --- a/requirements/static/ci/py3.10/windows.txt +++ b/requirements/static/ci/py3.10/windows.txt @@ -308,8 +308,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.11/cloud.txt b/requirements/static/ci/py3.11/cloud.txt index a83527ee15b9..c1f9e9183648 100644 --- a/requirements/static/ci/py3.11/cloud.txt +++ b/requirements/static/ci/py3.11/cloud.txt @@ -446,9 +446,10 @@ pytest-shell-utilities==1.8.0 # via # -c requirements/static/ci/py3.11/linux.txt # pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.11/linux.txt + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.11/darwin.txt b/requirements/static/ci/py3.11/darwin.txt index 7fd5ffd488eb..f03ecc33041a 100644 --- a/requirements/static/ci/py3.11/darwin.txt +++ b/requirements/static/ci/py3.11/darwin.txt @@ -308,8 +308,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.11/freebsd.txt b/requirements/static/ci/py3.11/freebsd.txt index b6fc17085aea..f590604d2be9 100644 --- a/requirements/static/ci/py3.11/freebsd.txt +++ b/requirements/static/ci/py3.11/freebsd.txt @@ -307,8 +307,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.11/linux.txt b/requirements/static/ci/py3.11/linux.txt index e4dee258e06a..1c23b60c1818 100644 --- a/requirements/static/ci/py3.11/linux.txt +++ b/requirements/static/ci/py3.11/linux.txt @@ -324,8 +324,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.11/windows.txt b/requirements/static/ci/py3.11/windows.txt index 533a506872c4..5805ca012b04 100644 --- a/requirements/static/ci/py3.11/windows.txt +++ b/requirements/static/ci/py3.11/windows.txt @@ -304,8 +304,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.12/cloud.txt b/requirements/static/ci/py3.12/cloud.txt index a7aca219fc53..deb11a5621f0 100644 --- a/requirements/static/ci/py3.12/cloud.txt +++ b/requirements/static/ci/py3.12/cloud.txt @@ -446,9 +446,10 @@ pytest-shell-utilities==1.8.0 # via # -c requirements/static/ci/py3.12/linux.txt # pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.12/linux.txt + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.12/darwin.txt b/requirements/static/ci/py3.12/darwin.txt index 5830968b7c27..dee6d2f8a3bd 100644 --- a/requirements/static/ci/py3.12/darwin.txt +++ b/requirements/static/ci/py3.12/darwin.txt @@ -308,8 +308,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.12/freebsd.txt b/requirements/static/ci/py3.12/freebsd.txt index b03594486655..31444237bdad 100644 --- a/requirements/static/ci/py3.12/freebsd.txt +++ b/requirements/static/ci/py3.12/freebsd.txt @@ -307,8 +307,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.12/linux.txt b/requirements/static/ci/py3.12/linux.txt index c0a9ce436b38..5c9055f8c864 100644 --- a/requirements/static/ci/py3.12/linux.txt +++ b/requirements/static/ci/py3.12/linux.txt @@ -324,8 +324,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.12/windows.txt b/requirements/static/ci/py3.12/windows.txt index 83a5207977d4..c154d4f98785 100644 --- a/requirements/static/ci/py3.12/windows.txt +++ b/requirements/static/ci/py3.12/windows.txt @@ -304,8 +304,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.7/cloud.txt b/requirements/static/ci/py3.7/cloud.txt index a124d4c40a78..0c6c573ae001 100644 --- a/requirements/static/ci/py3.7/cloud.txt +++ b/requirements/static/ci/py3.7/cloud.txt @@ -530,9 +530,10 @@ pytest-shell-utilities==1.8.0 # via # -c requirements/static/ci/py3.7/linux.txt # pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.0 ; python_version < "3.8" # via # -c requirements/static/ci/py3.7/linux.txt + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.7/freebsd.txt b/requirements/static/ci/py3.7/freebsd.txt index 41265a081f7e..a2bc4b2d666f 100644 --- a/requirements/static/ci/py3.7/freebsd.txt +++ b/requirements/static/ci/py3.7/freebsd.txt @@ -371,8 +371,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.0 ; python_version < "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.7/linux.txt b/requirements/static/ci/py3.7/linux.txt index 03b9b6a2e882..8e5253ad65b2 100644 --- a/requirements/static/ci/py3.7/linux.txt +++ b/requirements/static/ci/py3.7/linux.txt @@ -383,8 +383,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.0 ; python_version < "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.7/windows.txt b/requirements/static/ci/py3.7/windows.txt index de820b25b406..e59c9ccc427c 100644 --- a/requirements/static/ci/py3.7/windows.txt +++ b/requirements/static/ci/py3.7/windows.txt @@ -323,8 +323,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.0 ; python_version < "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.8/cloud.txt b/requirements/static/ci/py3.8/cloud.txt index 92138a595db1..a72f33cb2c92 100644 --- a/requirements/static/ci/py3.8/cloud.txt +++ b/requirements/static/ci/py3.8/cloud.txt @@ -516,9 +516,10 @@ pytest-shell-utilities==1.8.0 # via # -c requirements/static/ci/py3.8/linux.txt # pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.8/linux.txt + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.8/freebsd.txt b/requirements/static/ci/py3.8/freebsd.txt index 00cdba1b2256..cbacf12301e8 100644 --- a/requirements/static/ci/py3.8/freebsd.txt +++ b/requirements/static/ci/py3.8/freebsd.txt @@ -357,8 +357,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.8/linux.txt b/requirements/static/ci/py3.8/linux.txt index 594b8c106b76..583da473b1d7 100644 --- a/requirements/static/ci/py3.8/linux.txt +++ b/requirements/static/ci/py3.8/linux.txt @@ -369,8 +369,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.8/windows.txt b/requirements/static/ci/py3.8/windows.txt index 3e67555b202e..9d490f6f8994 100644 --- a/requirements/static/ci/py3.8/windows.txt +++ b/requirements/static/ci/py3.8/windows.txt @@ -309,8 +309,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.9/cloud.txt b/requirements/static/ci/py3.9/cloud.txt index 647fc725be98..8cc07e4db5d7 100644 --- a/requirements/static/ci/py3.9/cloud.txt +++ b/requirements/static/ci/py3.9/cloud.txt @@ -518,9 +518,10 @@ pytest-shell-utilities==1.8.0 # via # -c requirements/static/ci/py3.9/linux.txt # pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via # -c requirements/static/ci/py3.9/linux.txt + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.9/darwin.txt b/requirements/static/ci/py3.9/darwin.txt index 12a75bae3d96..d54f2e9281f8 100644 --- a/requirements/static/ci/py3.9/darwin.txt +++ b/requirements/static/ci/py3.9/darwin.txt @@ -366,8 +366,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.9/freebsd.txt b/requirements/static/ci/py3.9/freebsd.txt index f56f2ea6544a..1e830cd7cf3d 100644 --- a/requirements/static/ci/py3.9/freebsd.txt +++ b/requirements/static/ci/py3.9/freebsd.txt @@ -359,8 +359,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.9/linux.txt b/requirements/static/ci/py3.9/linux.txt index 772d1601a6c4..8075f781b7d9 100644 --- a/requirements/static/ci/py3.9/linux.txt +++ b/requirements/static/ci/py3.9/linux.txt @@ -369,8 +369,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/requirements/static/ci/py3.9/windows.txt b/requirements/static/ci/py3.9/windows.txt index af27c5a56d20..03d521b7b0d9 100644 --- a/requirements/static/ci/py3.9/windows.txt +++ b/requirements/static/ci/py3.9/windows.txt @@ -310,8 +310,9 @@ pytest-salt-factories==1.0.1 # via -r requirements/pytest.txt pytest-shell-utilities==1.8.0 # via pytest-salt-factories -pytest-skip-markers==1.5.0 +pytest-skip-markers==1.5.2 ; python_version >= "3.8" # via + # -r requirements/pytest.txt # pytest-salt-factories # pytest-shell-utilities # pytest-system-statistics diff --git a/salt/utils/platform.py b/salt/utils/platform.py index a0563b08266b..59a04b451bcd 100644 --- a/salt/utils/platform.py +++ b/salt/utils/platform.py @@ -228,24 +228,11 @@ def is_aarch64(): """ Simple function to return if host is AArch64 or not """ - return platform.machine().startswith("aarch64") - - -@real_memoize -def is_arm64(): - """ - Simple function to return if host is Arm64 or not - """ - return platform.machine().startswith("arm64") - - -## DGM Debugging -@real_memoize -def dgm_machine(): - """ - Simple function to return what machine string, debug purpose only - """ - return platform.machine() + if is_darwin(): + # Allow for MacOS Arm64 platform returning differently from Linux + return platform.machine().startswith("arm64") + else: + return platform.machine().startswith("aarch64") def spawning_platform(): diff --git a/tests/support/pkg.py b/tests/support/pkg.py index ae5efe4fd50a..066db28921e2 100644 --- a/tests/support/pkg.py +++ b/tests/support/pkg.py @@ -31,7 +31,6 @@ from saltfactories.utils import cli_scripts import salt.utils.files -import salt.utils.platform as dgm_platform from tests.conftest import CODE_DIR from tests.support.pytest.helpers import TestAccount @@ -838,13 +837,9 @@ def install_previous(self, downgrade=False): self._install_ssm_service() elif platform.is_darwin(): - print( - f"DGM test/support/pkg for darwin, machine string '{dgm_platform.dgm_machine()}'", - flush=True, - ) - if relenv and dgm_platform.is_arm64(): + if relenv and platform.is_aarch64(): arch = "arm64" - elif dgm_platform.is_arm64() and self.classic: + elif platform.is_aarch64() and self.classic: arch = "arm64" else: arch = "x86_64" @@ -861,16 +856,6 @@ def install_previous(self, downgrade=False): f"https://repo.saltproject.io/salt/py3/macos/{major_ver}/{mac_pkg}" ) - if relenv: - dgm_relenv = True - else: - dgm_relenv = False - - print( - f"DGM test/support/pkg for darwin, relenv '{dgm_relenv}', is_aarch64 '{platform.is_aarch64()}', dgm is_arm64 '{dgm_platform.is_arm64()}', classic '{self.classic}', arch '{arch}', mac_pkg '{mac_pkg}', mac_pkg_url '{mac_pkg_url}'", - flush=True, - ) - mac_pkg_path = f"/tmp/{mac_pkg}" if not os.path.exists(mac_pkg_path): download_file(