From 1e92ac25fd015a8501fb628596ad261a47a647b1 Mon Sep 17 00:00:00 2001 From: Marcel Telka Date: Fri, 26 Jul 2024 12:08:06 +0200 Subject: [PATCH] Add support for Solaris and illumos --- src/pytestsysstats/plugin.py | 3 +++ tests/functional/test_syststats.py | 1 + 2 files changed, 4 insertions(+) diff --git a/src/pytestsysstats/plugin.py b/src/pytestsysstats/plugin.py index 4009858..20cbeee 100644 --- a/src/pytestsysstats/plugin.py +++ b/src/pytestsysstats/plugin.py @@ -93,6 +93,9 @@ def __attrs_post_init__(self) -> None: if platform.is_freebsd(): # FreeBSD doesn't apparently support uss self.sys_stats_mem_type = "rss" + if platform.is_sunos(): + # Solaris and illumos doesn't apparently support uss + self.sys_stats_mem_type = "rss" else: self.sys_stats_mem_type = "rss" diff --git a/tests/functional/test_syststats.py b/tests/functional/test_syststats.py index 9c6ef31..4168cad 100644 --- a/tests/functional/test_syststats.py +++ b/tests/functional/test_syststats.py @@ -96,6 +96,7 @@ def test_one(): @pytest.mark.skip_on_freebsd +@pytest.mark.skip_on_sunos def test_basic_sys_stats_uss(pytester): pytester.makepyfile( """