diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index dd1d616..2c05d65 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -SOURCES/psutil-5.8.0.tar.gz /psutil-5.8.0.tar.gz diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index 648918d..0000000 --- a/gating.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- !Policy -product_versions: - - rhel-9 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/plan.fmf b/plan.fmf deleted file mode 100644 index e6427de..0000000 --- a/plan.fmf +++ /dev/null @@ -1,4 +0,0 @@ -discover: - how: fmf -execute: - how: tmt diff --git a/python-psutil-add-tolerance.patch b/python-psutil-add-tolerance.patch deleted file mode 100644 index 8c41db4..0000000 --- a/python-psutil-add-tolerance.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 4ffbcb458ff0b838f2bfe387b6305c4817e363ae Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Thu, 15 Apr 2021 17:07:38 +0200 -Subject: [PATCH] Add tolerance to - test_linux.TestSystemVirtualMemory.test_total - -We see this test as very flaky without tolerance in Fedora and CentOS ---- - psutil/tests/test_linux.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py -index 0c6d498c8..f5243c2cd 100755 ---- a/psutil/tests/test_linux.py -+++ b/psutil/tests/test_linux.py -@@ -243,7 +243,8 @@ def test_total(self): - # self.assertEqual(free_value, psutil_value) - vmstat_value = vmstat('total memory') * 1024 - psutil_value = psutil.virtual_memory().total -- self.assertAlmostEqual(vmstat_value, psutil_value) -+ self.assertAlmostEqual( -+ vmstat_value, psutil_value, delta=TOLERANCE_SYS_MEM) - - @retry_on_failure() - def test_used(self): diff --git a/python-psutil-skip-flaky-tests.patch b/python-psutil-skip-flaky-tests.patch new file mode 100644 index 0000000..47d1487 --- /dev/null +++ b/python-psutil-skip-flaky-tests.patch @@ -0,0 +1,23 @@ +From 2dda5cf427161ebb66a2de2429395d67fbba3955 Mon Sep 17 00:00:00 2001 +From: Tomas Orsava +Date: Tue, 26 Jan 2021 15:02:57 +0100 +Subject: [PATCH] Skip flaky tests +--- + psutil/tests/test_system.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py +index a55164c..912a254 100755 +--- a/psutil/tests/test_system.py ++++ b/psutil/tests/test_system.py +@@ -724,6 +724,7 @@ class TestNetAPIs(PsutilTestCase): + self.assertEqual(psutil.net_io_counters(pernic=True), {}) + assert m.called + ++ @unittest.skip("Skip flaky tests") + def test_net_if_addrs(self): + nics = psutil.net_if_addrs() + assert nics, nics +-- +2.29.2 + diff --git a/python-psutil-skip-test-broken-ipv6.patch b/python-psutil-skip-test-broken-ipv6.patch new file mode 100644 index 0000000..a1269e5 --- /dev/null +++ b/python-psutil-skip-test-broken-ipv6.patch @@ -0,0 +1,26 @@ +From 19faccd7ebef5c1c8095848909b2b6a629ec0d91 Mon Sep 17 00:00:00 2001 +From: Tomas Orsava +Date: Tue, 26 Jan 2021 12:49:50 +0100 +Subject: [PATCH] Test skipped due to broken handling of IPv6 addresses + +See: https://github.com/giampaolo/psutil/issues/1909 +--- + psutil/tests/test_linux.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py +index 2c5d701..ef77157 100755 +--- a/psutil/tests/test_linux.py ++++ b/psutil/tests/test_linux.py +@@ -920,7 +920,7 @@ class TestLoadAvg(PsutilTestCase): + # ===================================================================== + + +-@unittest.skipIf(not LINUX, "LINUX only") ++@unittest.skip("Test skipped due to broken handling of IPv6 addresses: https://github.com/giampaolo/psutil/issues/1909") + class TestSystemNetIfAddrs(PsutilTestCase): + + def test_ips(self): +-- +2.29.2 + diff --git a/python-psutil-skip-tests-in-brew.patch b/python-psutil-skip-tests-in-brew.patch deleted file mode 100644 index b63a842..0000000 --- a/python-psutil-skip-tests-in-brew.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py -index c1d0a94..e9914a9 100755 ---- a/psutil/tests/test_linux.py -+++ b/psutil/tests/test_linux.py -@@ -924,6 +924,7 @@ class TestLoadAvg(PsutilTestCase): - @unittest.skipIf(not LINUX, "LINUX only") - class TestSystemNetIfAddrs(PsutilTestCase): - -+ @unittest.skip("Broken in brew") - def test_ips(self): - for name, addrs in psutil.net_if_addrs().items(): - for addr in addrs: -diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py -index a55164c..21a04bb 100755 ---- a/psutil/tests/test_system.py -+++ b/psutil/tests/test_system.py -@@ -724,6 +724,7 @@ class TestNetAPIs(PsutilTestCase): - self.assertEqual(psutil.net_io_counters(pernic=True), {}) - assert m.called - -+ @unittest.skip("Broken in brew") - def test_net_if_addrs(self): - nics = psutil.net_if_addrs() - assert nics, nics diff --git a/python-psutil.spec b/python-psutil.spec index c5c8dec..fbcc926 100644 --- a/python-psutil.spec +++ b/python-psutil.spec @@ -1,11 +1,7 @@ %global srcname psutil %global sum A process and system utilities module for Python -# RHEL 8: Tests disabled due to missing dependencies, but pass with pip-installed deps -%bcond_with tests - -# Filter Python modules from Provides -%global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$ +%bcond_without tests Name: python-%{srcname} Version: 5.8.0 @@ -25,6 +21,13 @@ ExcludeArch: i686 # Patch0: python-psutil-skip-tests-in-mock.patch +# Skip test due to broken handling of IPv6 addresses +# See: https://github.com/giampaolo/psutil/issues/1909 +Patch1: python-psutil-skip-test-broken-ipv6.patch + +# Skip flaky tests +Patch2: python-psutil-skip-flaky-tests.patch + BuildRequires: make BuildRequires: gcc BuildRequires: python%{python3_pkgversion}-devel @@ -32,7 +35,6 @@ BuildRequires: python%{python3_pkgversion}-rpm-macros # Test dependencies %if %{with tests} BuildRequires: procps-ng -BuildRequires: python%{python3_pkgversion}-mock BuildRequires: python%{python3_pkgversion}-setuptools %endif diff --git a/test_bundled.fmf b/test_bundled.fmf deleted file mode 100644 index 998894f..0000000 --- a/test_bundled.fmf +++ /dev/null @@ -1,10 +0,0 @@ -framework: shell -require: -- make -- gcc -- procps-ng -- python3-psutil -- python3-psutil-tests -- python3-devel -- python3-setuptools -test: python3 -m psutil.tests