From 8ef2cc99441fab7c9dc963df00f42f47dd3e1009c8e23a89886256756175fd1d Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 15 Jun 2017 11:58:36 +0000 Subject: [PATCH 1/2] Accepting request 503384 from openSUSE:Leap:15.0:Rings:1-MinimalX - exclude http2 and ssh tests if curl(-mini) doesn't support it See also bug 1042919 OBS-URL: https://build.opensuse.org/request/show/503384 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=27 --- python-pycurl.changes | 5 +++++ python-pycurl.spec | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/python-pycurl.changes b/python-pycurl.changes index f69fda3..70aed52 100644 --- a/python-pycurl.changes +++ b/python-pycurl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 8 16:15:49 UTC 2017 - lnussel@suse.de + +- exclude http2 and ssh tests if curl(-mini) doesn't support it + ------------------------------------------------------------------- Tue Dec 20 15:55:00 UTC 2016 - jmatejek@suse.com diff --git a/python-pycurl.spec b/python-pycurl.spec index 22bc720..e2f89ed 100644 --- a/python-pycurl.spec +++ b/python-pycurl.spec @@ -83,13 +83,16 @@ pushd tests/fake-curl/libcurl rm -f *.so make popd -EXCLUDES="" -%if 0%{?suse_version} < 1320 -# CURL too old to know HTTP/2 -EXCLUDES="-e test_http_version_2_0" -%endif +# exclude certain tests +test_flags='!online' +if ! pkg-config --variable=supported_features libcurl|grep -qw HTTP2; then + test_flags="$test_flags,\!http2" +fi +if ! pkg-config --variable=supported_protocols libcurl|grep -qw SCP; then + test_flags="$test_flags,\!ssh" +fi %{python_expand PYTHONPATH=$(ls -d build/lib.*) \ - nosetests-%$python_bin_suffix --with-flaky -a '!online' $EXCLUDES} + nosetests-%$python_bin_suffix --with-flaky -a "$test_flags"} %files %{python_files} %defattr(-,root,root,-) From c9e5b920e1a8a382e89d37dd2a2b916190eb764f2f87d2981337aa63c5dd2149 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Wed, 21 Jun 2017 13:51:57 +0000 Subject: [PATCH 2/2] Accepting request 505248 from home:alarrosa:branches:devel:languages:python - Add increase_test_timeout.diff so tests don't fail when obs is overloaded and it takes more than 1 second to start a service. OBS-URL: https://build.opensuse.org/request/show/505248 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=28 --- increase_test_timeout.diff | 17 +++++++++++++++++ python-pycurl.changes | 6 ++++++ python-pycurl.spec | 3 +++ 3 files changed, 26 insertions(+) create mode 100644 increase_test_timeout.diff diff --git a/increase_test_timeout.diff b/increase_test_timeout.diff new file mode 100644 index 0000000..4076db1 --- /dev/null +++ b/increase_test_timeout.diff @@ -0,0 +1,17 @@ +Index: pycurl-7.43.0/tests/runwsgi.py +=================================================================== +--- pycurl-7.43.0.orig/tests/runwsgi.py ++++ pycurl-7.43.0/tests/runwsgi.py +@@ -55,10 +55,10 @@ def start_bottle_server(app, port, serve + server_thread.daemon = True + server_thread.start() + +- ok = util.wait_for_network_service(('127.0.0.1', port), 0.1, 10) ++ ok = util.wait_for_network_service(('127.0.0.1', port), 0.1, 30) + if not ok: + import warnings +- warnings.warn('Server did not start after 1 second') ++ warnings.warn('Server did not start after 3 seconds') + + return server_thread.server + diff --git a/python-pycurl.changes b/python-pycurl.changes index 70aed52..dcbee26 100644 --- a/python-pycurl.changes +++ b/python-pycurl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 21 09:51:22 UTC 2017 - alarrosa@suse.com + +- Add increase_test_timeout.diff so tests don't fail when obs is + overloaded and it takes more than 1 second to start a service. + ------------------------------------------------------------------- Thu Jun 8 16:15:49 UTC 2017 - lnussel@suse.de diff --git a/python-pycurl.spec b/python-pycurl.spec index e2f89ed..dc468ab 100644 --- a/python-pycurl.spec +++ b/python-pycurl.spec @@ -28,6 +28,8 @@ Url: http://pycurl.sourceforge.net/ Source: https://files.pythonhosted.org/packages/source/p/pycurl/pycurl-%{version}.tar.gz # PATCH-FIX-UPSTREAM remove __DATE__ and __TIME__ Patch0: pycurl-no-runtime-curlvercheck.patch +# PATCH-FIX-OPENSUSE increase_test_timeout.diff -- Increase the timeout in a test so it doesn't fail when obs is overloaded +Patch1: increase_test_timeout.diff BuildRequires: %{python_module CherryPy} BuildRequires: %{python_module bottle} BuildRequires: %{python_module devel} @@ -67,6 +69,7 @@ This package contains documentation and examples. %prep %setup -q -n pycurl-%{version} %patch0 -p1 +%patch1 -p1 %build export CFLAGS="%{optflags}"