Skip to content

Commit

Permalink
Merge f5e8061 into 35981c5
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Jun 10, 2020
2 parents 35981c5 + f5e8061 commit 49f0377
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 128 deletions.
18 changes: 9 additions & 9 deletions .travis.yml
Expand Up @@ -7,7 +7,7 @@
# python: one day so making the migration simpler). "shell" and
# "minimal" are aliases.
language: shell
dist: xenial
dist: bionic
group: travis_latest
os:
- linux
Expand All @@ -31,11 +31,11 @@ env:
- CCACHE_SLOPPINESS=file_macro,time_macros,include_file_ctime,include_file_mtime
- CCACHE_NOHASHDIR=true
- BUILD_LIBS=$HOME/.libs
- GEVENTSETUP_EV_VERIFY=2
- GEVENTSETUP_EV_VERIFY=1
# Disable some warnings produced by libev especially and also some Cython generated code.
# Note that changing the value of these variables invalidates configure caches
- CFLAGS="-Ofast -pipe -Wno-strict-aliasing -Wno-comment"
- CPPFLAGS="-I$BUILD_LIBS/include -DEV_VERIFY=3"
- CPPFLAGS="-I$BUILD_LIBS/include -DEV_VERIFY=1"
- LDFLAGS="-L$BUILD_LIBS/lib"
- LD_LIBRARY_PATH="$BUILD_LIBS/lib"
# Uploading built wheels for releases.
Expand Down Expand Up @@ -64,7 +64,7 @@ env:
- TRAVIS_PYTHON_VERSION=3.9
- TRAVIS_PYTHON_VERSION=pypy2.7
- TRAVIS_PYTHON_VERSION=pypy3.6
- TRAVIS_PYTHON_VERSION=2.7 GEVENTSETUP_EMBED=0 GEVENTSETUP_EV_VERIFY=3
- TRAVIS_PYTHON_VERSION=2.7 GEVENTSETUP_EMBED=0 GEVENTSETUP_EV_VERIFY=1

cache:
pip: true
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
- os: osx
env: TRAVIS_PYTHON_VERSION=pypy3.6
- os: osx
env: TRAVIS_PYTHON_VERSION=2.7 GEVENTSETUP_EMBED=0 GEVENTSETUP_EV_VERIFY=3
env: TRAVIS_PYTHON_VERSION=2.7 GEVENTSETUP_EMBED=0 GEVENTSETUP_EV_VERIFY=1

include:
- &build-gevent
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
os: osx

- <<: *build-gevent
env: TRAVIS_PYTHON_VERSION=2.7 GEVENTSETUP_EMBED=0 GEVENTSETUP_EV_VERIFY=3
env: TRAVIS_PYTHON_VERSION=2.7 GEVENTSETUP_EMBED=0 GEVENTSETUP_EV_VERIFY=1
install:
# Install the Python runtime
- *build-gevent-python
Expand Down Expand Up @@ -362,14 +362,14 @@ jobs:
- <<: *test-ares-jobs
# This job exercises both the non-embedded ares resolver
# and the non-embedded Cython libev loop.
env: TRAVIS_PYTHON_VERSION=2.7 GEVENTSETUP_EMBED=0 GEVENTSETUP_EV_VERIFY=3
env: TRAVIS_PYTHON_VERSION=2.7 GEVENTSETUP_EMBED=0 GEVENTSETUP_EV_VERIFY=1
name: c-ares resolver, external (Python 2.7)
# These exercise the CFFI versions.
- <<: *test-libuv-jobs
env: TRAVIS_PYTHON_VERSION=2.7 GEVENTSETUP_EMBED=0 GEVENTSETUP_EV_VERIFY=3
env: TRAVIS_PYTHON_VERSION=2.7 GEVENTSETUP_EMBED=0 GEVENTSETUP_EV_VERIFY=1
name: libuv backend, external (Python 2.7)
- <<: *test-libev-jobs
env: TRAVIS_PYTHON_VERSION=2.7 GEVENTSETUP_EMBED=0 GEVENTSETUP_EV_VERIFY=3
env: TRAVIS_PYTHON_VERSION=2.7 GEVENTSETUP_EMBED=0 GEVENTSETUP_EV_VERIFY=1
name: libev backend, external (Python 2.7)

# PyPy 2.7
Expand Down
2 changes: 2 additions & 0 deletions docs/changes/1623.feature
@@ -0,0 +1,2 @@
gevent's CI is now tested on Ubuntu 18.04 (Bionic), an upgrade from
16.04 (Xenial).
18 changes: 17 additions & 1 deletion src/gevent/testing/patched_tests_setup.py
Expand Up @@ -1076,6 +1076,9 @@ def test(*args, **kwargs):
# RT_CONSISTENT' failed!" and fail.
disabled_tests += [
'test_threading.ThreadTests.test_is_alive_after_fork',
# This has timing constraints that are strict and do not always
# hold.
'test_selectors.PollSelectorTestCase.test_timeout',
]

if TRAVIS:
Expand Down Expand Up @@ -1230,7 +1233,7 @@ def test(*args, **kwargs):
disabled_tests += [
# This sometimes produces ``self.assertEqual(1, len(s.select(0))): 1 != 0``.
# Probably needs to spin the loop once.
'test_selectors.DefaultSelectorTestCase.test_timeout',
'test_selectors.BaseSelectorTestCase.test_timeout',
]

if PY38:
Expand Down Expand Up @@ -1312,6 +1315,19 @@ def test(*args, **kwargs):
'test_subprocess.POSIXProcessTestTest.test_send_signal_race',
]

if TRAVIS:
disabled_tests += [
# These tests frequently break when we try to use newer Travis CI images,
# due to different versions of OpenSSL being available. See above for some
# specific examples. Usually the tests catch up, eventually (e.g., at this writing,
# the 3.9b1 tests are fine on Ubuntu Bionic, but all other versions fail).
'test_ssl.ContextTests.test_options',
'test_ssl.ThreadedTests.test_alpn_protocols',
'test_ssl.ThreadedTests.test_default_ecdh_curve',
'test_ssl.ThreadedTests.test_shared_ciphers',

]

# Now build up the data structure we'll use to actually find disabled tests
# to avoid a linear scan for every file (it seems the list could get quite large)
# (First, freeze the source list to make sure it isn't modified anywhere)
Expand Down
11 changes: 11 additions & 0 deletions src/gevent/testing/sysinfo.py
Expand Up @@ -176,3 +176,14 @@ def libev_supports_linux_aio():
from platform import release

return system() == 'Linux' and LooseVersion(release() or '0') >= LooseVersion('4.19')

def libev_supports_linux_iouring():
# libev requires kernel XXX to be able to support linux io_uring.
# It fails with the kernel in fedora rawhide (4.19.76) but
# works (doesn't fail catastrophically when asked to create one)
# with kernel 5.3.0 (Ubuntu Bionic)
from distutils.version import LooseVersion
from platform import system
from platform import release

return system() == 'Linux' and LooseVersion(release() or '0') >= LooseVersion('5.3')
7 changes: 4 additions & 3 deletions src/gevent/tests/test__close_backend_fd.py
Expand Up @@ -32,10 +32,11 @@ class Test(unittest.TestCase):
)

BACKENDS_THAT_WILL_FAIL_TO_CREATE_AT_RUNTIME = (
# This fails on the Ubuntu Bionic image, and on
# the Fedora Rawhide 33 image. It's not clear why; needs
# investigated.
# This fails on the Fedora Rawhide 33 image. It's not clear
# why; needs investigated.
'linux_iouring',
) if not sysinfo.libev_supports_linux_iouring() else (

)

BACKENDS_THAT_WILL_FAIL_TO_CREATE_AT_RUNTIME += (
Expand Down

0 comments on commit 49f0377

Please sign in to comment.