Author: Armin Rigo <[email protected]>
Branch:
Changeset: r78967:22d130dae1a6
Date: 2015-08-13 15:28 +0100
http://bitbucket.org/pypy/pypy/changeset/22d130dae1a6/
Log: Skip skip skip the rvmprof tests on 32bit
diff --git a/rpython/rlib/rvmprof/__init__.py b/rpython/rlib/rvmprof/__init__.py
--- a/rpython/rlib/rvmprof/__init__.py
+++ b/rpython/rlib/rvmprof/__init__.py
@@ -2,6 +2,7 @@
from rpython.rlib.rvmprof.rvmprof import _get_vmprof, VMProfError
from rpython.rlib.rvmprof.rvmprof import vmprof_execute_code, MAX_FUNC_NAME
from rpython.rlib.rvmprof.rvmprof import _was_registered
+from rpython.rlib.rvmprof.cintf import VMProfPlatformUnsupported
#
# See README.txt.
diff --git a/rpython/rlib/rvmprof/rvmprof.py b/rpython/rlib/rvmprof/rvmprof.py
--- a/rpython/rlib/rvmprof/rvmprof.py
+++ b/rpython/rlib/rvmprof/rvmprof.py
@@ -196,6 +196,11 @@
(including 'self' if applicable).
"""
def decorate(func):
+ try:
+ _get_vmprof()
+ except cintf.VMProfPlatformUnsupported:
+ return func
+
if hasattr(func, 'im_self'):
assert func.im_self is None
func = func.im_func
diff --git a/rpython/rlib/rvmprof/test/test_rvmprof.py
b/rpython/rlib/rvmprof/test/test_rvmprof.py
--- a/rpython/rlib/rvmprof/test/test_rvmprof.py
+++ b/rpython/rlib/rvmprof/test/test_rvmprof.py
@@ -8,7 +8,10 @@
class MyCode:
pass
- rvmprof.register_code_object_class(MyCode, lambda code: 'some code')
+ try:
+ rvmprof.register_code_object_class(MyCode, lambda code: 'some code')
+ except rvmprof.VMProfPlatformUnsupported:
+ pass
@rvmprof.vmprof_execute_code("xcode1", lambda code, num: code)
def main(code, num):
@@ -29,7 +32,10 @@
class MyCode:
pass
- rvmprof.register_code_object_class(MyCode, lambda code: 'some code')
+ try:
+ rvmprof.register_code_object_class(MyCode, lambda code: 'some code')
+ except rvmprof.VMProfPlatformUnsupported:
+ pass
class A:
pass
@@ -54,7 +60,10 @@
class MyCode:
pass
- rvmprof.register_code_object_class(MyCode, lambda code: 'some code')
+ try:
+ rvmprof.register_code_object_class(MyCode, lambda code: 'some code')
+ except rvmprof.VMProfPlatformUnsupported, e:
+ py.test.skip(str(e))
@rvmprof.vmprof_execute_code("xcode1", lambda code, num: code)
def main(code, num):
@@ -79,7 +88,10 @@
pass
def get_name(code):
return 'py:code:52:x'
- rvmprof.register_code_object_class(MyCode, get_name)
+ try:
+ rvmprof.register_code_object_class(MyCode, get_name)
+ except rvmprof.VMProfPlatformUnsupported, e:
+ py.test.skip(str(e))
@rvmprof.vmprof_execute_code("xcode1", lambda code, num: code)
def main(code, num):
diff --git a/rpython/rlib/rvmprof/test/test_ztranslation.py
b/rpython/rlib/rvmprof/test/test_ztranslation.py
--- a/rpython/rlib/rvmprof/test/test_ztranslation.py
+++ b/rpython/rlib/rvmprof/test/test_ztranslation.py
@@ -1,4 +1,4 @@
-import time, os, sys
+import time, os, sys, py
from rpython.tool.udir import udir
from rpython.rlib import rvmprof
from rpython.translator.c.test.test_genc import compile
@@ -14,7 +14,10 @@
def setup_module(mod):
- rvmprof.register_code_object_class(MyCode, MyCode.get_name)
+ try:
+ rvmprof.register_code_object_class(MyCode, MyCode.get_name)
+ except rvmprof.VMProfPlatformUnsupported, e:
+ py.test.skip(str(e))
@rvmprof.vmprof_execute_code("interp", lambda code: code)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit