diff --git a/disable_randomly_failing_tests.patch b/disable_randomly_failing_tests.patch new file mode 100644 index 0000000..792050f --- /dev/null +++ b/disable_randomly_failing_tests.patch @@ -0,0 +1,58 @@ +Index: pycurl-7.43.0.2/tests/memory_mgmt_test.py +=================================================================== +--- pycurl-7.43.0.2.orig/tests/memory_mgmt_test.py 2018-06-02 06:29:03.000000000 +0200 ++++ pycurl-7.43.0.2/tests/memory_mgmt_test.py 2018-11-02 15:06:49.831677767 +0100 +@@ -9,6 +9,7 @@ import unittest + import gc + import flaky + from . import util ++import nose + + debug = False + +@@ -17,6 +18,7 @@ if sys.platform == 'win32': + else: + devnull = '/dev/null' + ++@nose.plugins.attrib.attr('occasionally_failing') + @flaky.flaky(max_runs=3) + class MemoryMgmtTest(unittest.TestCase): + def maybe_enable_debug(self): +Index: pycurl-7.43.0.2/tests/multi_memory_mgmt_test.py +=================================================================== +--- pycurl-7.43.0.2.orig/tests/multi_memory_mgmt_test.py 2018-05-22 05:44:40.000000000 +0200 ++++ pycurl-7.43.0.2/tests/multi_memory_mgmt_test.py 2018-11-02 15:07:13.703835912 +0100 +@@ -7,11 +7,13 @@ import unittest + import gc + import flaky + import weakref ++import nose + + from . import util + + debug = False + ++@nose.plugins.attrib.attr('occasionally_failing') + @flaky.flaky(max_runs=3) + class MultiMemoryMgmtTest(unittest.TestCase): + def test_opensocketfunction_collection(self): +Index: pycurl-7.43.0.2/tests/multi_timer_test.py +=================================================================== +--- pycurl-7.43.0.2.orig/tests/multi_timer_test.py 2018-06-02 06:14:57.000000000 +0200 ++++ pycurl-7.43.0.2/tests/multi_timer_test.py 2018-11-02 15:07:26.263919115 +0100 +@@ -5,6 +5,7 @@ + from . import localhost + import pycurl + import unittest ++import nose + + from . import appmanager + from . import util +@@ -23,6 +24,7 @@ def teardown_module(mod): + teardown_module_2(mod) + teardown_module_1(mod) + ++@nose.plugins.attrib.attr('occasionally_failing') + class MultiSocketTest(unittest.TestCase): + def test_multi_timer(self): + urls = [ diff --git a/python-pycurl.changes b/python-pycurl.changes index 97cf135..bca7353 100644 --- a/python-pycurl.changes +++ b/python-pycurl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Nov 2 11:14:22 UTC 2018 - Vítězslav Čížek + +- Don't run tests that fail randomly or under load + * add disable_randomly_failing_tests.patch + ------------------------------------------------------------------- Thu Sep 6 12:53:06 UTC 2018 - Matěj Cepl diff --git a/python-pycurl.spec b/python-pycurl.spec index 56439ab..8feb777 100644 --- a/python-pycurl.spec +++ b/python-pycurl.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -44,6 +44,7 @@ Patch0: increase_test_timeout.diff Patch1: pycurl-libssh.patch # PATCH-FIX-OPENSUSE python-pycurl-7.43.0-tls-backend.patch -- do not run runtime tests to compare linked libs Patch2: python-pycurl-7.43.0-tls-backend.patch +Patch3: disable_randomly_failing_tests.patch BuildRequires: %{python_module devel} BuildRequires: fdupes BuildRequires: libcurl-devel >= 7.19.0 @@ -106,7 +107,7 @@ rm -f *.so make %{?_smp_mflags} popd # exclude certain tests -test_flags='!online' +test_flags='!online,!occasionally_failing' if ! pkg-config --variable=supported_features libcurl|grep -qw HTTP2; then test_flags="$test_flags,\!http2" fi