Skip to content

Commit

Permalink
Use updated pytest-skip-markers to pick up corrected MacOS Arm64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
dmurphy18 authored and dwoz committed Aug 12, 2024
1 parent 34e0120 commit 6e43c93
Show file tree
Hide file tree
Showing 31 changed files with 65 additions and 63 deletions.
2 changes: 2 additions & 0 deletions requirements/pytest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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'
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.10/cloud.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.10/darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.10/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.10/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.10/windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.11/cloud.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.11/darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.11/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.11/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.11/windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.12/cloud.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.12/darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.12/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.12/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.12/windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.7/cloud.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.7/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.7/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.7/windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.8/cloud.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.8/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.8/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.8/windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.9/cloud.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.9/darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.9/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.9/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements/static/ci/py3.9/windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 5 additions & 18 deletions salt/utils/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
19 changes: 2 additions & 17 deletions tests/support/pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand All @@ -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(
Expand Down

0 comments on commit 6e43c93

Please sign in to comment.