[pypy-svn] r71799 - in pypy/release/1.2.x/pypy: doc translator/c/test translator/jvm/test translator/platform
arigo at codespeak.net
arigo at codespeak.net
Fri Mar 5 15:14:33 CET 2010
Author: arigo
Date: Fri Mar 5 15:14:31 2010
New Revision: 71799
Modified:
pypy/release/1.2.x/pypy/doc/getting-started-python.txt
pypy/release/1.2.x/pypy/translator/c/test/test_standalone.py
pypy/release/1.2.x/pypy/translator/jvm/test/test_builtin.py
pypy/release/1.2.x/pypy/translator/platform/maemo.py
Log:
svn merge svn+ssh://codespeak.net/svn/pypy/trunk -r71702:71707
Modified: pypy/release/1.2.x/pypy/doc/getting-started-python.txt
==============================================================================
--- pypy/release/1.2.x/pypy/doc/getting-started-python.txt (original)
+++ pypy/release/1.2.x/pypy/doc/getting-started-python.txt Fri Mar 5 15:14:31 2010
@@ -67,8 +67,8 @@
possibly replacing ``--opt=jit`` with another `optimization level`_
of your choice like ``--opt=2`` if you do not want the included JIT
- compiler. (The default level so far is 2. Do not use ``--opt=jit``
- on something else than Intel **32-bit** machines.)
+ compiler. (As of March 2010, the default level is ``--opt=2``, and
+ ``--opt=jit`` requires an Intel **32-bit** environment.)
.. _`optimization level`: config/opt.html
Modified: pypy/release/1.2.x/pypy/translator/c/test/test_standalone.py
==============================================================================
--- pypy/release/1.2.x/pypy/translator/c/test/test_standalone.py (original)
+++ pypy/release/1.2.x/pypy/translator/c/test/test_standalone.py Fri Mar 5 15:14:31 2010
@@ -398,7 +398,8 @@
out, err = cbuilder.cmdexec("", expect_crash=True)
assert out.strip() == ''
lines = err.strip().splitlines()
- assert lines[-1] == 'Fatal RPython error: ValueError'
+ idx = lines.index('Fatal RPython error: ValueError') # assert found
+ lines = lines[:idx+1]
assert len(lines) >= 4
l0, l1, l2 = lines[-4:-1]
assert l0 == 'RPython traceback:'
@@ -408,7 +409,8 @@
out2, err2 = cbuilder.cmdexec("x", expect_crash=True)
assert out2.strip() == ''
lines2 = err2.strip().splitlines()
- assert lines2[-1] == 'Fatal RPython error: KeyError'
+ idx = lines2.index('Fatal RPython error: KeyError') # assert found
+ lines2 = lines2[:idx+1]
l0, l1, l2 = lines2[-4:-1]
assert l0 == 'RPython traceback:'
assert re.match(r' File "\w+.c", line \d+, in entry_point', l1)
@@ -435,7 +437,8 @@
out, err = cbuilder.cmdexec("", expect_crash=True)
assert out.strip() == 'done.'
lines = err.strip().splitlines()
- assert lines[-1] == 'Fatal RPython error: KeyError'
+ idx = lines.index('Fatal RPython error: KeyError') # assert found
+ lines = lines[:idx+1]
assert len(lines) >= 5
l0, l1, l2, l3 = lines[-5:-1]
assert l0 == 'RPython traceback:'
@@ -471,7 +474,8 @@
out, err = cbuilder.cmdexec("", expect_crash=True)
assert out.strip() == 'done.'
lines = err.strip().splitlines()
- assert lines[-1] == 'Fatal RPython error: KeyError'
+ idx = lines.index('Fatal RPython error: KeyError') # assert found
+ lines = lines[:idx+1]
assert len(lines) >= 5
l0, l1, l2, l3 = lines[-5:-1]
assert l0 == 'RPython traceback:'
@@ -506,7 +510,8 @@
out, err = cbuilder.cmdexec("", expect_crash=True)
assert out.strip() == ''
lines = err.strip().splitlines()
- assert lines[-1] == 'Fatal RPython error: ValueError'
+ idx = lines.index('Fatal RPython error: ValueError') # assert found
+ lines = lines[:idx+1]
assert len(lines) >= 5
l0, l1, l2, l3 = lines[-5:-1]
assert l0 == 'RPython traceback:'
@@ -522,7 +527,7 @@
out, err = cbuilder.cmdexec("", expect_crash=True)
assert out.strip() == ''
lines = err.strip().splitlines()
- assert lines[-1] == 'in pypy_g_RPyRaiseException: AssertionError'
+ assert 'in pypy_g_RPyRaiseException: AssertionError' in lines
def test_assertion_error_nondebug(self):
def g(x):
@@ -539,7 +544,8 @@
out, err = cbuilder.cmdexec("", expect_crash=True)
assert out.strip() == ''
lines = err.strip().splitlines()
- assert lines[-1] == 'Fatal RPython error: AssertionError'
+ idx = lines.index('Fatal RPython error: AssertionError') # assert found
+ lines = lines[:idx+1]
assert len(lines) >= 4
l0, l1, l2 = lines[-4:-1]
assert l0 == 'RPython traceback:'
@@ -556,7 +562,7 @@
out, err = cbuilder.cmdexec("", expect_crash=True)
assert out.strip() == ''
lines = err.strip().splitlines()
- assert lines[-1] == 'in pypy_g_entry_point: foobar'
+ assert 'in pypy_g_entry_point: foobar' in lines
def test_ll_assert_error_nondebug(self):
py.test.skip("implement later, maybe: tracebacks even with ll_assert")
@@ -574,7 +580,8 @@
out, err = cbuilder.cmdexec("", expect_crash=True)
assert out.strip() == ''
lines = err.strip().splitlines()
- assert lines[-1] == 'PyPy assertion failed: foobar'
+ idx = lines.index('PyPy assertion failed: foobar') # assert found
+ lines = lines[:idx+1]
assert len(lines) >= 4
l0, l1, l2 = lines[-4:-1]
assert l0 == 'RPython traceback:'
Modified: pypy/release/1.2.x/pypy/translator/jvm/test/test_builtin.py
==============================================================================
--- pypy/release/1.2.x/pypy/translator/jvm/test/test_builtin.py (original)
+++ pypy/release/1.2.x/pypy/translator/jvm/test/test_builtin.py Fri Mar 5 15:14:31 2010
@@ -29,7 +29,7 @@
def test_os_access(self):
from socket import gethostname
- if gethostname() == 'wyvern':
+ if 1: # gethostname() == 'wyvern':
py.test.skip('bug in JDK when run headless: ' +
'http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6539705')
BaseTestBuiltin.test_os_access(self)
Modified: pypy/release/1.2.x/pypy/translator/platform/maemo.py
==============================================================================
--- pypy/release/1.2.x/pypy/translator/platform/maemo.py (original)
+++ pypy/release/1.2.x/pypy/translator/platform/maemo.py Fri Mar 5 15:14:31 2010
@@ -1,11 +1,12 @@
-import py
+import py, os
from pypy.translator.platform.linux import Linux, _run_subprocess, GnuMakefile
from pypy.translator.platform import ExecutionResult, log
from pypy.tool.udir import udir
from pypy.tool import autopath
def check_scratchbox():
- if not py.path.local('/scratchbox/login').check():
+ # in order to work, that file must exist and be executable by us
+ if not os.access('/scratchbox/login', os.X_OK):
py.test.skip("No scratchbox detected")
class Maemo(Linux):
More information about the Pypy-commit
mailing list