Commit b57e1896 authored by Jason Madden's avatar Jason Madden

Successful test with CPython 3.5 on Windows 10; have to elide getaddrinfo and...

Successful test with CPython 3.5 on Windows 10; have to elide getaddrinfo and getnameinfo because they won't link.
parent e8f73096
...@@ -82,8 +82,18 @@ if WIN: ...@@ -82,8 +82,18 @@ if WIN:
_libuv_source('win/error.c'), _libuv_source('win/error.c'),
_libuv_source('win/fs-event.c'), _libuv_source('win/fs-event.c'),
_libuv_source('win/fs.c'), _libuv_source('win/fs.c'),
_libuv_source('win/getaddrinfo.c'), # getaddrinfo.c refers to ConvertInterfaceIndexToLuid
_libuv_source('win/getnameinfo.c'), # and ConvertInterfaceLuidToNameA, which are supposedly in iphlpapi.h
# and iphlpapi.lib/dll. But on Windows 10 with Python 3.5 and VC 14 (Visual Studio 2015),
# I get an undefined warning from the compiler for those functions and
# a link error from the linker, so this file can't be included.
# This is possibly because the functions are defined for Windows Vista, and
# Python 3.5 builds with at earlier SDK?
# Fortunately we don't use those functions.
#_libuv_source('win/getaddrinfo.c'),
# getnameinfo.c refers to uv__getaddrinfo_translate_error from
# getaddrinfo.c, which we don't have.
#_libuv_source('win/getnameinfo.c'),
_libuv_source('win/handle.c'), _libuv_source('win/handle.c'),
_libuv_source('win/loop-watcher.c'), _libuv_source('win/loop-watcher.c'),
_libuv_source('win/pipe.c'), _libuv_source('win/pipe.c'),
......
...@@ -43,6 +43,7 @@ import _six as six ...@@ -43,6 +43,7 @@ import _six as six
PYPY = hasattr(sys, 'pypy_version_info') PYPY = hasattr(sys, 'pypy_version_info')
VERBOSE = sys.argv.count('-v') > 1 VERBOSE = sys.argv.count('-v') > 1
LIBUV = os.getenv('GEVENT_CORE_CFFI_ONLY') == 'libuv' # XXX: Formalize this better LIBUV = os.getenv('GEVENT_CORE_CFFI_ONLY') == 'libuv' # XXX: Formalize this better
WIN = sys.platform.startswith("win")
if '--debug-greentest' in sys.argv: if '--debug-greentest' in sys.argv:
sys.argv.remove('--debug-greentest') sys.argv.remove('--debug-greentest')
...@@ -57,7 +58,7 @@ OPTIONAL_MODULES = ['resolver_ares'] ...@@ -57,7 +58,7 @@ OPTIONAL_MODULES = ['resolver_ares']
# on particular platforms; they generally contain partial # on particular platforms; they generally contain partial
# implementations completed in different modules. # implementations completed in different modules.
PLATFORM_SPECIFIC_SUFFIXES = ['2', '279', '3'] PLATFORM_SPECIFIC_SUFFIXES = ['2', '279', '3']
if sys.platform.startswith('win'): if WIN:
PLATFORM_SPECIFIC_SUFFIXES.append('posix') PLATFORM_SPECIFIC_SUFFIXES.append('posix')
PY2 = None PY2 = None
...@@ -88,7 +89,7 @@ elif sys.version_info[0] == 2: ...@@ -88,7 +89,7 @@ elif sys.version_info[0] == 2:
PYPY3 = PYPY and PY3 PYPY3 = PYPY and PY3
if sys.platform.startswith('win'): if WIN:
NON_APPLICABLE_SUFFIXES.append("posix") NON_APPLICABLE_SUFFIXES.append("posix")
# This is intimately tied to FileObjectPosix # This is intimately tied to FileObjectPosix
NON_APPLICABLE_SUFFIXES.append("fileobject2") NON_APPLICABLE_SUFFIXES.append("fileobject2")
...@@ -103,6 +104,11 @@ def _do_not_skip(reason): ...@@ -103,6 +104,11 @@ def _do_not_skip(reason):
return f return f
return dec return dec
if WIN:
skipOnWindows = unittest.skip
else:
skipOnWindows = _do_not_skip
if RUNNING_ON_APPVEYOR: if RUNNING_ON_APPVEYOR:
# See comments scattered around about timeouts and the timer # See comments scattered around about timeouts and the timer
# resolution available on appveyor (lots of jitter). this # resolution available on appveyor (lots of jitter). this
......
...@@ -21,7 +21,8 @@ class TestWatchers(unittest.TestCase): ...@@ -21,7 +21,8 @@ class TestWatchers(unittest.TestCase):
def test_io(self): def test_io(self):
if sys.platform == 'win32': if sys.platform == 'win32':
Error = IOError # libev raises IOError, libuv raises ValueError
Error = (IOError,ValueError)
win32 = True win32 = True
else: else:
Error = ValueError Error = ValueError
......
...@@ -68,7 +68,7 @@ class Test(greentest.TestCase): ...@@ -68,7 +68,7 @@ class Test(greentest.TestCase):
loop.destroy() loop.destroy()
@greentest.skipOnAppVeyor("Stdout can't be watched on Win32") @greentest.skipOnWindows("Stdout can't be watched on Win32")
def test_reuse_io(self): def test_reuse_io(self):
loop = core.loop(default=False) loop = core.loop(default=False)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment