[pypy-commit] pypy default: merge win32-fixes3 into default
mattip
noreply at buildbot.pypy.org
Sat Jun 1 21:45:09 CEST 2013
Author: mattip <matti.picus at gmail.com>
Branch:
Changeset: r64706:216ba1e7cb65
Date: 2013-06-01 22:44 +0300
http://bitbucket.org/pypy/pypy/changeset/216ba1e7cb65/
Log: merge win32-fixes3 into default
diff --git a/pypy/doc/whatsnew-head.rst b/pypy/doc/whatsnew-head.rst
--- a/pypy/doc/whatsnew-head.rst
+++ b/pypy/doc/whatsnew-head.rst
@@ -46,3 +46,7 @@
.. branch: operrfmt-NT
Adds a couple convenient format specifiers to operationerrfmt
+
+.. branch: win32-fixes3
+Skip and fix some non-translated (own) tests for win32 builds
+
diff --git a/pypy/interpreter/test/test_app_main.py b/pypy/interpreter/test/test_app_main.py
--- a/pypy/interpreter/test/test_app_main.py
+++ b/pypy/interpreter/test/test_app_main.py
@@ -578,6 +578,11 @@
class TestNonInteractive:
def run_with_status_code(self, cmdline, senddata='', expect_prompt=False,
expect_banner=False, python_flags='', env=None):
+ if os.name == 'nt':
+ try:
+ import __pypy__
+ except:
+ py.test.skip('app_main cannot run on non-pypy for windows')
cmdline = '%s %s "%s" %s' % (sys.executable, python_flags,
app_main, cmdline)
print 'POPEN:', cmdline
@@ -706,6 +711,11 @@
assert 'copyright' not in data
def test_non_interactive_stdout_fully_buffered(self):
+ if os.name == 'nt':
+ try:
+ import __pypy__
+ except:
+ py.test.skip('app_main cannot run on non-pypy for windows')
path = getscript(r"""
import sys, time
sys.stdout.write('\x00(STDOUT)\n\x00') # stays in buffers
@@ -726,6 +736,11 @@
def test_non_interactive_stdout_unbuffered(self, monkeypatch):
monkeypatch.setenv('PYTHONUNBUFFERED', '1')
+ if os.name == 'nt':
+ try:
+ import __pypy__
+ except:
+ py.test.skip('app_main cannot run on non-pypy for windows')
path = getscript(r"""
import sys, time
sys.stdout.write('\x00(STDOUT)\n\x00')
diff --git a/pypy/module/test_lib_pypy/test_ctypes_config_cache.py b/pypy/module/test_lib_pypy/test_ctypes_config_cache.py
--- a/pypy/module/test_lib_pypy/test_ctypes_config_cache.py
+++ b/pypy/module/test_lib_pypy/test_ctypes_config_cache.py
@@ -41,6 +41,10 @@
assert 'LOG_NOTICE' in d
def test_resource():
+ try:
+ import lib_pypy.resource
+ except ImportError:
+ py.test.skip('no syslog on this platform')
d = run('resource.ctc.py', '_resource_cache.py')
assert 'RLIM_NLIMITS' in d
diff --git a/rpython/rlib/ropenssl.py b/rpython/rlib/ropenssl.py
--- a/rpython/rlib/ropenssl.py
+++ b/rpython/rlib/ropenssl.py
@@ -9,7 +9,7 @@
link_files = []
include_dirs = []
if sys.platform == 'win32' and platform.name != 'mingw32':
- libraries = ['libeay32', 'ssleay32',
+ libraries = ['libeay32', 'ssleay32', 'zlib1',
'user32', 'advapi32', 'gdi32', 'msvcrt', 'ws2_32']
includes = [
# ssl.h includes winsock.h, which will conflict with our own
diff --git a/rpython/rlib/rposix.py b/rpython/rlib/rposix.py
--- a/rpython/rlib/rposix.py
+++ b/rpython/rlib/rposix.py
@@ -103,11 +103,10 @@
_set_errno(rffi.cast(INT, errno))
if os.name == 'nt':
- is_valid_fd = rffi.llexternal(
+ is_valid_fd = jit.dont_look_inside(rffi.llexternal(
"_PyVerify_fd", [rffi.INT], rffi.INT,
compilation_info=errno_eci,
- )
- @jit.dont_look_inside
+ ))
def validate_fd(fd):
if not is_valid_fd(fd):
raise OSError(get_errno(), 'Bad file descriptor')
diff --git a/rpython/rlib/rzlib.py b/rpython/rlib/rzlib.py
--- a/rpython/rlib/rzlib.py
+++ b/rpython/rlib/rzlib.py
@@ -10,7 +10,7 @@
if compiler.name == "msvc":
- libname = 'zlib'
+ libname = 'zlib1' # since version 1.1.4 and later, see http://www.zlib.net/DLL_FAQ.txt
else:
libname = 'z'
eci = ExternalCompilationInfo(
diff --git a/rpython/rtyper/tool/test/test_rffi_platform.py b/rpython/rtyper/tool/test/test_rffi_platform.py
--- a/rpython/rtyper/tool/test/test_rffi_platform.py
+++ b/rpython/rtyper/tool/test/test_rffi_platform.py
@@ -288,9 +288,6 @@
assert a % struct.calcsize("P") == 0
def test_external_lib():
- # XXX this one seems to be a bit too platform-specific. Check
- # how to test it on windows correctly (using so_prefix?)
- # and what are alternatives to LD_LIBRARY_PATH
eci = ExternalCompilationInfo()
c_source = """
int f(int a, int b)
@@ -298,12 +295,17 @@
return (a + b);
}
"""
+ if platform.name == 'mscv':
+ c_source = '__declspec(dllexport) ' + c_source
+ libname = 'libc_lib'
+ else:
+ libname = 'c_lib'
tmpdir = udir.join('external_lib').ensure(dir=1)
c_file = tmpdir.join('libc_lib.c')
c_file.write(c_source)
l = platform.compile([c_file], eci, standalone=False)
eci = ExternalCompilationInfo(
- libraries = ['c_lib'],
+ libraries = [libname],
library_dirs = [str(tmpdir)]
)
rffi_platform.verify_eci(eci)
diff --git a/rpython/translator/c/gcc/test/test_asmgcroot.py b/rpython/translator/c/gcc/test/test_asmgcroot.py
--- a/rpython/translator/c/gcc/test/test_asmgcroot.py
+++ b/rpython/translator/c/gcc/test/test_asmgcroot.py
@@ -25,8 +25,8 @@
@classmethod
def make_config(cls):
- if _MSVC and _WIN64:
- py.test.skip("all asmgcroot tests disabled for MSVC X64")
+ if _MSVC:
+ py.test.skip("all asmgcroot tests disabled for MSVC")
from rpython.config.translationoption import get_combined_translation_config
config = get_combined_translation_config(translating=True)
config.translation.gc = cls.gcpolicy
More information about the pypy-commit
mailing list