bump psutil-5.9.2 (from main)

This commit is contained in:
Andreas Billmeier 2022-10-06 08:22:34 +02:00 committed by Andreas Billmeier
parent a311074c45
commit c8d8de2225
Signed by: onkelbeh
GPG Key ID: E6DB12C8C550F3C0
5 changed files with 329 additions and 132 deletions

View File

@ -1,7 +1,7 @@
AUX psutil-5.7.2-tests.patch 4427 BLAKE2B 8b2847eb445eb39080123dc1018ccf8c68c0ceb88538d9abef454724d298225ba3f65f735fd8528d3ed22d4f463e8025677144442ac471aeeea44bbe7c607d55 SHA512 46145825084b5d09e2dfa7f7b765757a8d5ac7ff2379ae66bb628ea30f010daff2fe9d389f7846a1f63f9b03c4b7bd8ac4f4d07a4ed977e06a68b63a4e27231b
AUX psutil-5.9.0-tests.patch 12930 BLAKE2B 486e8b5316cda0aa7b03f803a76d800a6c40fe1188de1dcf334710fc4e1a53b759759956af0397ccd2afe75cb476b76f0b84675b517b74505b0889e512a593a7 SHA512 b9b67f5adfcd64693e5492ed6c03c0af8faf926a4091c0728e5f409bc3d8bcc1bf7eea76168bda5c6b4b9d69a850597cf26f5b87a4d0f1abdbd60cafcdf3104e
DIST psutil-5.8.0.tar.gz 470886 BLAKE2B f3d8d55dcbc2e0821f1ce96b9187692b2389681e13599b04e33b10f11fbe02f768a4dfc0802fe506713c8c3306d4c7011f2ac659c78f6a23a5523c7e36abc318 SHA512 b716bcbf33ceacdc30ddd0d0cf9bca0ab7751225b8f20dea664a82751dc88cb590720b098ae26056c8b3cdabcfe2fa198d618cea24c21465b1368a52ee182818
AUX psutil-5.9.1-tests-r2.patch 13840 BLAKE2B 572206cfee9493577215f5b9d1a0b39b38fe0d389d2074a743b26f3eb06c88b2325c6f4558ea7acde3a258becb4163ec9212058ab03913c3b48a427449541f6c SHA512 2ca5e401a9ad0c30829e31e827cc5810de3a1c10010f0d8fd8ddf30465583f35741d03b684dfda42f7990127e89790971683d382d58e5fceea5022e460c87c9e
DIST psutil-5.9.0.tar.gz 478322 BLAKE2B 763c8ae14ae546bed64a360047d2ce38783e9e7e939160f751c4ccc94b8e023aaa4cdca426f584e05dae8b1326333660e216d7cb3edd820e24a931dddfa5160f SHA512 b521cfce51e90fdf87ba19bf8069877e3210aede92c17460ea0b00324a36e133168e4bff550462d07ab6d93c597c6560d68954340031ff43168d54a8e5d4c4e7
EBUILD psutil-5.8.0.ebuild 1034 BLAKE2B 46952c44a50f9a5718730338c823607876711bb130ff42b7801ef1f50fce7a7be77f2e44015dff8212fced599b515e9d23cec523951ce886aff0f6009bfa6094 SHA512 a29169586bf294ee402c30537c6c4d99eb72b51a80d252fc0633e686ad9b4615f9ebd06be5e6a6a5d25df13219094695ab60bf5f064231e5d05ebae3d31728b7
EBUILD psutil-5.9.0.ebuild 1157 BLAKE2B 10236f0cfb2e5b2f58e6c79e029edebd7e5d8e9ebc53f12b8620b6eb649db6ac7198cb0abdd18e0a17df6e3a86fe84a642ed202f09742a3b93e2f91e29f73297 SHA512 77ff144ed2f3c70555ec8c92b6feb73350a8ee97e96b1e92719a7847a4fd3014b26df9cc608813f45b63e0e4ef5ad3ea091774fb2e753522ec01a7c6a588b950
DIST psutil-5.9.2.tar.gz 479757 BLAKE2B 3f8b4bb2977618a9e567e335a0ecb4f28ca70f126a447e1492423de397c1d5d66c5007eba8ea134d8804204ef86915dd4f6163a257d55bcd0786d6dc4e06bfd9 SHA512 431c0209e9a27176ea570699b3e23a88fccaded4bfbad9cd9c02e110c00eb613bdefae447b4b967e6cadc3291d0d4404e4525de5ee3d7f7f9ae26c7876bff8b4
EBUILD psutil-5.9.0.ebuild 981 BLAKE2B 979140d4504d47dda41199beb6a6d3eca56f02f959d4a4ec70df33a0120adcb9072027462c6a37db22386525b72cbe435f26d09a8d625c981dbac8fb3ca663c3 SHA512 bb2df37c3139fc8700ae12f824c31fd1c7e76ab184a149ed56b35444cb61baa06e685c0f39f4b520f4985917e7de2daa6e4114eb3b87cc115e09ba7334324890
EBUILD psutil-5.9.2.ebuild 1010 BLAKE2B 583c3e86ba25d7287ef30fdc9d1b16764d1af72e41e600287da99e13fef72689250552a21336e6b5b0a63d911ef35dcae24573d7baa668bc6fbeacb8c42ef36f SHA512 5d78ce5e7267fac4622cef60f17ea1b3ff2db9606dd403e771b78b8e1bea47b47dda808713f1e6d6113c7182d3c14fbf761aa0f1eba43738634567f0845295c8
MISC metadata.xml 453 BLAKE2B ad3bfb4c3cc9282101992249938f41e8e0e21e5d2eafd12da1f3bafeb317f3b37840e311327c50c3046909ef2d083e938d28d4115ab1bc4402ea66dd46320ec9 SHA512 e1f423b04b6ae5d5440e5ea4ae46b7eda3f14bb7e8cd0a75a2489bcd62d98bb4acad495b145e19c39c04d96e80cc0724602e9f9848178799c07ed731cb0f339e

View File

@ -1,112 +0,0 @@
From e910d08976e00bc12b5a516daa9e6a6d42d48354 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Wed, 19 Feb 2020 07:27:32 +0100
Subject: [PATCH] Skip broken tests on Gentoo
---
psutil/tests/test_linux.py | 8 ++++++++
psutil/tests/test_posix.py | 1 +
psutil/tests/test_process.py | 2 ++
psutil/tests/test_system.py | 1 +
4 files changed, 12 insertions(+)
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
index e51f8bd5..48527ccb 100755
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -17,5 +17,6 @@ import re
import shutil
import socket
import struct
+import sys
import textwrap
import time
@@ -381,6 +382,8 @@ class TestSystemVirtualMemory(unittest.TestCase):
ret = psutil.virtual_memory()
assert m.called
self.assertEqual(ret.available, 2057400 * 1024 + 4818144 * 1024)
+ if sys.version_info < (3,):
+ return
w = ws[0]
self.assertIn(
"inactive memory stats couldn't be determined", str(w.message))
@@ -411,6 +414,8 @@ class TestSystemVirtualMemory(unittest.TestCase):
ret = psutil.virtual_memory()
self.assertEqual(
ret.available, 2057400 * 1024 + 4818144 * 1024)
+ if sys.version_info < (3,):
+ return
w = ws[0]
self.assertIn(
"inactive memory stats couldn't be determined",
@@ -882,6 +887,7 @@ class TestLoadAvg(unittest.TestCase):
@unittest.skipIf(not LINUX, "LINUX only")
class TestSystemNetIfAddrs(unittest.TestCase):
+ @unittest.skip("broken on Gentoo")
def test_ips(self):
for name, addrs in psutil.net_if_addrs().items():
for addr in addrs:
@@ -1364,7 +1370,8 @@ class TestMisc(unittest.TestCase):
psutil.PROCFS_PATH = "/proc"
os.rmdir(tdir)
@retry_on_failure()
+ @unittest.skip("broken on Gentoo")
def test_issue_687(self):
# In case of thread ID:
# - pid_exists() is supposed to return False
@@ -2073,6 +2080,7 @@ class TestProcessAgainstStatus(unittest.TestCase):
value = self.read_status_file("nonvoluntary_ctxt_switches:")
self.assertEqual(self.proc.num_ctx_switches().involuntary, value)
+ @unittest.skip("broken on Gentoo")
def test_cpu_affinity(self):
value = self.read_status_file("Cpus_allowed_list:")
if '-' in str(value):
diff --git a/psutil/tests/test_posix.py b/psutil/tests/test_posix.py
index a96b310f..70199203 100755
--- a/psutil/tests/test_posix.py
+++ b/psutil/tests/test_posix.py
@@ -364,6 +364,7 @@ class TestSystemAPIs(unittest.TestCase):
"couldn't find %s nic in 'ifconfig -a' output\n%s" % (
nic, output))
+ @unittest.skip("broken on Gentoo")
@unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI")
@retry_on_failure()
def test_users(self):
diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
index 987bdf38..cb04f3ef 100755
--- a/psutil/tests/test_process.py
+++ b/psutil/tests/test_process.py
@@ -350,6 +350,7 @@ class TestProcess(unittest.TestCase):
self.assertGreaterEqual(io2[i], 0)
self.assertGreaterEqual(io2[i], 0)
+ @unittest.skip("fails if builder is ioniced already")
@unittest.skipIf(not HAS_IONICE, "not supported")
@unittest.skipIf(not LINUX, "linux only")
def test_ionice_linux(self):
@@ -1495,6 +1496,7 @@ class TestProcess(unittest.TestCase):
d2 = clean_dict(os.environ.copy())
self.assertEqual(d1, d2)
+ @unittest.skip("broken by sandbox")
@unittest.skipIf(not HAS_ENVIRON, "not supported")
@unittest.skipIf(not POSIX, "POSIX only")
def test_weird_environ(self):
diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py
index 3834209f..b07b5883 100755
--- a/psutil/tests/test_system.py
+++ b/psutil/tests/test_system.py
@@ -215,6 +215,7 @@ class TestMiscAPIs(unittest.TestCase):
self.assertGreater(bt, 0)
self.assertLess(bt, time.time())
+ @unittest.skip("broken on Gentoo")
@unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI")
def test_users(self):
users = psutil.users()
--
2.25.1

View File

@ -0,0 +1,310 @@
diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py
index 82e08963..a2e84e78 100644
--- a/psutil/tests/__init__.py
+++ b/psutil/tests/__init__.py
@@ -84,6 +84,7 @@ __all__ = [
"HAS_IONICE", "HAS_MEMORY_MAPS", "HAS_PROC_CPU_NUM", "HAS_RLIMIT",
"HAS_SENSORS_BATTERY", "HAS_BATTERY", "HAS_SENSORS_FANS",
"HAS_SENSORS_TEMPERATURES", "HAS_MEMORY_FULL_INFO",
+ "GENTOO_TESTING",
# subprocesses
'pyrun', 'terminate', 'reap_children', 'spawn_testproc', 'spawn_zombie',
'spawn_children_pair',
@@ -124,6 +125,7 @@ PYPY = '__pypy__' in sys.builtin_module_names
APPVEYOR = 'APPVEYOR' in os.environ
GITHUB_ACTIONS = 'GITHUB_ACTIONS' in os.environ or 'CIBUILDWHEEL' in os.environ
CI_TESTING = APPVEYOR or GITHUB_ACTIONS
+GENTOO_TESTING = "GENTOO_TESTING" in os.environ
# are we a 64 bit process?
IS_64BIT = sys.maxsize > 2 ** 32
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
index 51e8be51..111e3be1 100755
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -29,6 +29,7 @@ from psutil._compat import PY3
from psutil._compat import FileNotFoundError
from psutil._compat import basestring
from psutil._compat import u
+from psutil.tests import GENTOO_TESTING
from psutil.tests import GITHUB_ACTIONS
from psutil.tests import GLOBAL_TIMEOUT
from psutil.tests import HAS_BATTERY
@@ -693,6 +694,7 @@ class TestSystemCPUCountLogical(PsutilTestCase):
num = len([x for x in out.split('\n') if not x.startswith('#')])
self.assertEqual(psutil.cpu_count(logical=True), num)
+ @unittest.skipIf(GENTOO_TESTING, "broken on some Gentoo arches")
def test_emulate_fallbacks(self):
import psutil._pslinux
original = psutil._pslinux.cpu_count_logical()
@@ -740,6 +742,7 @@ class TestSystemCPUCountCores(PsutilTestCase):
core_ids.add(fields[1])
self.assertEqual(psutil.cpu_count(logical=False), len(core_ids))
+ @unittest.skipIf(GENTOO_TESTING, "broken on some Gentoo arches")
def test_method_2(self):
meth_1 = psutil._pslinux.cpu_count_cores()
with mock.patch('glob.glob', return_value=[]) as m:
@@ -760,6 +763,7 @@ class TestSystemCPUCountCores(PsutilTestCase):
class TestSystemCPUFrequency(PsutilTestCase):
@unittest.skipIf(not HAS_CPU_FREQ, "not supported")
+ @unittest.skipIf(GENTOO_TESTING, "broken on some Gentoo arches")
def test_emulate_use_second_file(self):
# https://github.com/giampaolo/psutil/issues/981
def path_exists_mock(path):
@@ -774,6 +778,7 @@ class TestSystemCPUFrequency(PsutilTestCase):
assert psutil.cpu_freq()
@unittest.skipIf(not HAS_CPU_FREQ, "not supported")
+ @unittest.skipIf(GENTOO_TESTING, "broken on some Gentoo arches")
def test_emulate_use_cpuinfo(self):
# Emulate a case where /sys/devices/system/cpu/cpufreq* does not
# exist and /proc/cpuinfo is used instead.
@@ -901,11 +906,13 @@ class TestSystemCPUFrequency(PsutilTestCase):
@unittest.skipIf(not LINUX, "LINUX only")
class TestSystemCPUStats(PsutilTestCase):
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
def test_ctx_switches(self):
vmstat_value = vmstat("context switches")
psutil_value = psutil.cpu_stats().ctx_switches
self.assertAlmostEqual(vmstat_value, psutil_value, delta=500)
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
def test_interrupts(self):
vmstat_value = vmstat("interrupts")
psutil_value = psutil.cpu_stats().interrupts
@@ -934,6 +941,7 @@ class TestLoadAvg(PsutilTestCase):
@unittest.skipIf(not LINUX, "LINUX only")
class TestSystemNetIfAddrs(PsutilTestCase):
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
def test_ips(self):
for name, addrs in psutil.net_if_addrs().items():
for addr in addrs:
@@ -1100,6 +1108,7 @@ class TestSystemDiskPartitions(PsutilTestCase):
self.assertAlmostEqual(usage.used, used,
delta=TOLERANCE_DISK_USAGE)
+ @unittest.skipIf(GENTOO_TESTING, "makes bad assumptions")
def test_zfs_fs(self):
# Test that ZFS partitions are returned.
with open("/proc/filesystems", "r") as f:
@@ -1321,6 +1330,7 @@ class TestRootFsDeviceFinder(PsutilTestCase):
findmnt_value = sh("findmnt -o SOURCE -rn /")
self.assertEqual(psutil_value, findmnt_value)
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
def test_disk_partitions_mocked(self):
with mock.patch(
'psutil._pslinux.cext.disk_partitions',
@@ -1496,6 +1506,7 @@ class TestMisc(PsutilTestCase):
psutil.PROCFS_PATH = "/proc"
@retry_on_failure()
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
def test_issue_687(self):
# In case of thread ID:
# - pid_exists() is supposed to return False
@@ -1601,6 +1612,8 @@ class TestSensorsBattery(PsutilTestCase):
self.assertEqual(psutil.sensors_battery().power_plugged, False)
assert m.called
+ @unittest.skipIf(GENTOO_TESTING,
+ "mocking doesn't work with non-BAT0 battery")
def test_emulate_power_undetermined(self):
# Pretend we can't know whether the AC power cable not
# connected (assert fallback to False).
@@ -1619,6 +1632,8 @@ class TestSensorsBattery(PsutilTestCase):
self.assertIsNone(psutil.sensors_battery().power_plugged)
assert m.called
+ @unittest.skipIf(GENTOO_TESTING,
+ "mocking doesn't work with non-BAT0 battery")
def test_emulate_energy_full_0(self):
# Emulate a case where energy_full files returns 0.
with mock_open_content(
@@ -1626,6 +1641,8 @@ class TestSensorsBattery(PsutilTestCase):
self.assertEqual(psutil.sensors_battery().percent, 0)
assert m.called
+ @unittest.skipIf(GENTOO_TESTING,
+ "mocking doesn't work with non-BAT0 battery")
def test_emulate_energy_full_not_avail(self):
# Emulate a case where energy_full file does not exist.
# Expected fallback on /capacity.
@@ -1639,6 +1656,8 @@ class TestSensorsBattery(PsutilTestCase):
"/sys/class/power_supply/BAT0/capacity", b"88"):
self.assertEqual(psutil.sensors_battery().percent, 88)
+ @unittest.skipIf(GENTOO_TESTING,
+ "mocking doesn't work with non-BAT0 battery")
def test_emulate_no_power(self):
# Emulate a case where /AC0/online file nor /BAT0/status exist.
with mock_open_exception(
@@ -2218,6 +2237,7 @@ class TestProcessAgainstStatus(PsutilTestCase):
value = self.read_status_file("nonvoluntary_ctxt_switches:")
self.assertEqual(self.proc.num_ctx_switches().involuntary, value)
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
def test_cpu_affinity(self):
value = self.read_status_file("Cpus_allowed_list:")
if '-' in str(value):
diff --git a/psutil/tests/test_misc.py b/psutil/tests/test_misc.py
index add9646e..a7345c5c 100755
--- a/psutil/tests/test_misc.py
+++ b/psutil/tests/test_misc.py
@@ -38,6 +38,7 @@ from psutil._compat import FileNotFoundError
from psutil._compat import redirect_stderr
from psutil.tests import APPVEYOR
from psutil.tests import CI_TESTING
+from psutil.tests import GENTOO_TESTING
from psutil.tests import HAS_BATTERY
from psutil.tests import HAS_MEMORY_MAPS
from psutil.tests import HAS_NET_IO_COUNTERS
@@ -425,6 +426,7 @@ class TestCommonModule(PsutilTestCase):
with mock.patch('psutil._common.stat.S_ISREG', return_value=False):
assert not isfile_strict(this_file)
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
def test_debug(self):
if PY3:
from io import StringIO
diff --git a/psutil/tests/test_posix.py b/psutil/tests/test_posix.py
index ebbf7a6e..14ac69a1 100755
--- a/psutil/tests/test_posix.py
+++ b/psutil/tests/test_posix.py
@@ -24,6 +24,7 @@ from psutil import OPENBSD
from psutil import POSIX
from psutil import SUNOS
from psutil.tests import CI_TESTING
+from psutil.tests import GENTOO_TESTING
from psutil.tests import HAS_NET_IO_COUNTERS
from psutil.tests import PYTHON_EXE
from psutil.tests import PsutilTestCase
@@ -193,6 +194,7 @@ class TestProcess(PsutilTestCase):
vsz_psutil = psutil.Process(self.pid).memory_info()[1] / 1024
self.assertEqual(vsz_ps, vsz_psutil)
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
def test_name(self):
name_ps = ps_name(self.pid)
# remove path if there is any, from the command
@@ -271,6 +273,7 @@ class TestProcess(PsutilTestCase):
adjusted_ps_pathname = ps_pathname[:len(ps_pathname)]
self.assertEqual(ps_pathname, adjusted_ps_pathname)
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
def test_cmdline(self):
ps_cmdline = ps_args(self.pid)
psutil_cmdline = " ".join(psutil.Process(self.pid).cmdline())
@@ -326,6 +329,7 @@ class TestSystemAPIs(PsutilTestCase):
"couldn't find %s nic in 'ifconfig -a' output\n%s" % (
nic, output))
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
@unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI")
@retry_on_failure()
def test_users(self):
diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
index eb17e239..fb383a6d 100755
--- a/psutil/tests/test_process.py
+++ b/psutil/tests/test_process.py
@@ -39,6 +39,7 @@ from psutil._compat import long
from psutil._compat import super
from psutil.tests import APPVEYOR
from psutil.tests import CI_TESTING
+from psutil.tests import GENTOO_TESTING
from psutil.tests import GITHUB_ACTIONS
from psutil.tests import GLOBAL_TIMEOUT
from psutil.tests import HAS_CPU_AFFINITY
@@ -292,6 +293,7 @@ class TestProcess(PsutilTestCase):
time.strftime("%Y %m %d %H:%M:%S", time.localtime(p.create_time()))
@unittest.skipIf(not POSIX, 'POSIX only')
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
def test_terminal(self):
terminal = psutil.Process().terminal()
if terminal is not None:
@@ -341,6 +343,7 @@ class TestProcess(PsutilTestCase):
self.assertGreaterEqual(io2[i], 0)
self.assertGreaterEqual(io2[i], 0)
+ @unittest.skipIf(GENTOO_TESTING, "fails if builder is ioniced already")
@unittest.skipIf(not HAS_IONICE, "not supported")
@unittest.skipIf(not LINUX, "linux only")
def test_ionice_linux(self):
@@ -1424,6 +1427,7 @@ class TestProcess(PsutilTestCase):
if not OSX and GITHUB_ACTIONS:
self.assertEqual(d1, d2)
+ @unittest.skipIf(GENTOO_TESTING, "broken by Gentoo sandbox")
@unittest.skipIf(not HAS_ENVIRON, "not supported")
@unittest.skipIf(not POSIX, "POSIX only")
def test_weird_environ(self):
diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py
index e130c935..52d1530c 100755
--- a/psutil/tests/test_system.py
+++ b/psutil/tests/test_system.py
@@ -34,6 +34,7 @@ from psutil._compat import long
from psutil.tests import ASCII_FS
from psutil.tests import CI_TESTING
from psutil.tests import DEVNULL
+from psutil.tests import GENTOO_TESTING
from psutil.tests import GITHUB_ACTIONS
from psutil.tests import GLOBAL_TIMEOUT
from psutil.tests import HAS_BATTERY
@@ -198,6 +199,7 @@ class TestMiscAPIs(PsutilTestCase):
self.assertGreater(bt, 0)
self.assertLess(bt, time.time())
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
@unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI")
def test_users(self):
users = psutil.users()
@@ -425,6 +427,7 @@ class TestCpuAPIs(PsutilTestCase):
if difference >= 0.05:
return
+ @unittest.skipIf(GENTOO_TESTING, "flaky")
def test_cpu_times_comparison(self):
# Make sure the sum of all per cpu times is almost equal to
# base "one cpu" times.
@@ -511,6 +514,7 @@ class TestCpuAPIs(PsutilTestCase):
self.assertGreater(value, 0)
@unittest.skipIf(not HAS_CPU_FREQ, "not supported")
+ @unittest.skipIf(GENTOO_TESTING, "broken on some Gentoo arches")
def test_cpu_freq(self):
def check_ls(ls):
for nt in ls:
@@ -579,6 +583,7 @@ class TestDiskAPIs(PsutilTestCase):
def test_disk_usage_bytes(self):
psutil.disk_usage(b'.')
+ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
def test_disk_partitions(self):
def check_ntuple(nt):
self.assertIsInstance(nt.device, str)
diff --git a/psutil/tests/test_unicode.py b/psutil/tests/test_unicode.py
index 3fa3f017..526894b7 100755
--- a/psutil/tests/test_unicode.py
+++ b/psutil/tests/test_unicode.py
@@ -90,6 +90,7 @@ from psutil._compat import u
from psutil.tests import APPVEYOR
from psutil.tests import ASCII_FS
from psutil.tests import CI_TESTING
+from psutil.tests import GENTOO_TESTING
from psutil.tests import HAS_CONNECTIONS_UNIX
from psutil.tests import HAS_ENVIRON
from psutil.tests import HAS_MEMORY_MAPS
@@ -296,6 +297,7 @@ class TestFSAPIs(BaseUnicodeTest):
@unittest.skipIf(not HAS_MEMORY_MAPS, "not supported")
@unittest.skipIf(not PY3, "ctypes does not support unicode on PY2")
@unittest.skipIf(PYPY, "unstable on PYPY")
+ @unittest.skipIf(GENTOO_TESTING, "unstable")
def test_memory_maps(self):
# XXX: on Python 2, using ctypes.CDLL with a unicode path
# opens a message box which blocks the test run.

View File

@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..11} pypy3 )
PYTHON_COMPAT=( python3_{8..11} )
inherit distutils-r1
@ -14,7 +14,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="amd64 arm arm64 x86"
IUSE="test"
RESTRICT="!test? ( test )"

View File

@ -3,40 +3,39 @@
EAPI=8
PYTHON_COMPAT=( python3_{8..10} )
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..11} )
inherit distutils-r1
TEST_PATCH=psutil-5.9.1-tests-r2.patch
DESCRIPTION="Retrieve information on running processes and system utilization"
HOMEPAGE="https://github.com/giampaolo/psutil https://pypi.org/project/psutil/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 arm arm64 x86 ~amd64-linux ~x86-linux"
KEYWORDS="amd64 arm arm64 x86"
IUSE="test"
RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}/psutil-5.7.2-tests.patch"
"${FILESDIR}/${TEST_PATCH}"
)
DOCS="README.rst"
python_test() {
if [[ ${EPYTHON} == pypy* ]]; then
ewarn "Not running tests on ${EPYTHON} since they are broken"
return 0
fi
# since we are running in an environment a bit similar to CI,
# let's skip the tests that are disable for CI
TRAVIS=1 APPVEYOR=1 "${EPYTHON}" psutil/tests/runner.py ||
# Since we are running in an environment a bit similar to CI,
# let's skip the tests that are disabled for CI
local -x TRAVIS=1
local -x APPVEYOR=1
local -x GITHUB_ACTIONS=1
local -x GENTOO_TESTING=1
"${EPYTHON}" psutil/tests/runner.py ||
die "tests failed with ${EPYTHON}"
}
python_compile() {
# force -j1 to avoid .o linking race conditions
# Force -j1 to avoid .o linking race conditions
local MAKEOPTS=-j1
distutils-r1_python_compile
}