forked from pool/python-eventlet
Accepting request 827926 from home:bnavigator:branches:devel:languages:python
- do not run test on python 2 (sadly no real macro expansion possible to allow run but failok with ||:) - disable test discovery dir recursion gh#eventlet/eventlet#638 - simplify the pytest call, no test file deletions OBS-URL: https://build.opensuse.org/request/show/827926 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-eventlet?expand=0&rev=74
This commit is contained in:
committed by
Git OBS Bridge
parent
1dd3d84835
commit
0ee97b01f3
@@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 19 15:28:03 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- do not run test on python 2 (sadly no real macro expansion
|
||||||
|
possible to allow run but failok with ||:)
|
||||||
|
- disable test discovery dir recursion gh#eventlet/eventlet#638
|
||||||
|
- simplify the pytest call, no test file deletions
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Aug 17 09:38:44 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
Mon Aug 17 09:38:44 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ Source: https://files.pythonhosted.org/packages/source/e/eventlet/eventl
|
|||||||
# PATCH-FEATURE-UPSTREAM remove_nose.patch gh#eventlet/eventlet#638 mcepl@suse.com
|
# PATCH-FEATURE-UPSTREAM remove_nose.patch gh#eventlet/eventlet#638 mcepl@suse.com
|
||||||
# Removes dependency on nose
|
# Removes dependency on nose
|
||||||
Patch0: remove_nose.patch
|
Patch0: remove_nose.patch
|
||||||
# PATCH-FIX-UPSTREAM newdnspythis patch makes things totally awesomethon.patch gh#eventlet/eventlet#638 mcepl@suse.com
|
# PATCH-FIX-UPSTREAM newdnspython.patch gh#eventlet/eventlet#638 mcepl@suse.com
|
||||||
# patch is from gh#rthalley/dnspython#519
|
# patch is from gh#rthalley/dnspython#519
|
||||||
Patch1: newdnspython.patch
|
Patch1: newdnspython.patch
|
||||||
# PATCH-FEATURE-UPSTREAM pr_639.patch gh#eventlet/eventlet#639 jayvdb@gmail.com
|
# PATCH-FEATURE-UPSTREAM pr_639.patch gh#eventlet/eventlet#639 jayvdb@gmail.com
|
||||||
@@ -73,45 +73,8 @@ interpreter, or as part of a larger application.
|
|||||||
%autopatch -p1
|
%autopatch -p1
|
||||||
|
|
||||||
sed -i "s|^#!.*||" eventlet/support/greendns.py # Fix non-executable script
|
sed -i "s|^#!.*||" eventlet/support/greendns.py # Fix non-executable script
|
||||||
|
# https://github.com/eventlet/eventlet/issues/638
|
||||||
# As of 2020-08, upstream is not running their tests/stdlib tests in CI
|
sed -i "/assert num_readers/ i \ return" tests/__init__.py
|
||||||
|
|
||||||
# test setup fails
|
|
||||||
rm \
|
|
||||||
tests/nosewrapper.py \
|
|
||||||
tests/stdlib/all.py \
|
|
||||||
tests/stdlib/all_modules.py \
|
|
||||||
tests/stdlib/test_SimpleHTTPServer.py \
|
|
||||||
tests/stdlib/test_httpservers.py \
|
|
||||||
tests/stdlib/test_socket_ssl.py \
|
|
||||||
tests/stdlib/test_socketserver.py \
|
|
||||||
tests/stdlib/test_ssl.py \
|
|
||||||
tests/stdlib/test_thread__boundedsem.py \
|
|
||||||
tests/stdlib/test_urllib*.py
|
|
||||||
|
|
||||||
# large percentage errors
|
|
||||||
rm \
|
|
||||||
tests/backdoor_test.py \
|
|
||||||
tests/stdlib/test_asyncore.py \
|
|
||||||
tests/stdlib/test_ftplib.py \
|
|
||||||
tests/stdlib/test_select.py
|
|
||||||
|
|
||||||
# Too slow, possibly hanging
|
|
||||||
rm \
|
|
||||||
tests/stdlib/test_queue.py \
|
|
||||||
tests/stdlib/test_socket.py \
|
|
||||||
tests/stdlib/test_subprocess.py \
|
|
||||||
tests/stdlib/test_threading.py
|
|
||||||
|
|
||||||
# Unknown openSUSE 15.x specific errors, including a few not in tests/stdlib:
|
|
||||||
|
|
||||||
# TypeError: _wrap_socket() argument 1 must be _socket.socket, not SSLSocket
|
|
||||||
# https://github.com/rthalley/dnspython/issues/559#issuecomment-675274960
|
|
||||||
if [[ "%python3_version_nodots" == "36" ]]; then
|
|
||||||
rm \
|
|
||||||
tests/api_test.py tests/convenience_test.py tests/ssl_test.py tests/websocket_test.py tests/websocket_new_test.py tests/wsgi_test.py \
|
|
||||||
tests/stdlib/test_httplib.py tests/stdlib/test_thread.py
|
|
||||||
fi
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@@ -121,21 +84,22 @@ fi
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export EVENTLET_HUB=selects
|
# python2 is required to build for Leap, but tests fail (even upstream)
|
||||||
|
python2_skipall='--collect-only'
|
||||||
|
# dnspython 1 and 2: backdoor tests fail with "take too long"
|
||||||
|
skiptests="(BackdoorTest and test_server)"
|
||||||
|
# fail only with dnspython 2:
|
||||||
|
skiptests+=" or test_dns_methods_are_green or test_noraise_dns_tcp"
|
||||||
|
|
||||||
# test_raise_dns_tcp and test_noraise_dns_tcp likely minor dnspython 2 incompatibility
|
# Unknown openSUSE 15.x specific errors
|
||||||
# test_dns_methods_are_green fails because socket_resolve_green.py
|
# TypeError: _wrap_socket() argument 1 must be _socket.socket, not SSLSocket
|
||||||
# emits "name: test-host0. error: [Errno -2] Name or service not known"
|
# https://github.com/rthalley/dnspython/issues/559#issuecomment-675274960
|
||||||
# second set of test failures are the stdlib tests
|
%if %python3_version_nodots == 36
|
||||||
|
skiptests+=" or test_connect_ssl or test_ssl_sending_messages or test_wrap_ssl"
|
||||||
# Python 2 has many failures upstream also, that are not being actively fixed.
|
skiptests+=" or ssl_test or wsgi_test"
|
||||||
# They are mostly related to the test harness, rather than the library.
|
%endif
|
||||||
# e.g. https://github.com/eventlet/eventlet/issues/641
|
# no subdir recursion https://github.com/eventlet/eventlet/issues/638#issuecomment-676085599
|
||||||
%{python_expand if [[ "$python" != "python2" ]]; then
|
%pytest -o norecursedirs="tests/*" -k "not ($skiptests)" ${$python_skipall}
|
||||||
export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
|
||||||
$python -m pytest -rs -vv --ignore tests/manual -k 'not (test_raise_dns_tcp or test_noraise_dns_tcp or test_dns_methods_are_green) and not (test_get_exec_path or test_internal_execvpe_str or test_open_keywords or test_locked_repr or test_repr or test_timeout or test_unraisable_exception or ExceptHookTests or test_interrupt_main_noerror or test_threading_local)'
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
Reference in New Issue
Block a user