Author: hager <[email protected]>
Branch: ppc-jit-backend
Changeset: r46396:f8c92c646275
Date: 2011-08-09 16:39 +0200
http://bitbucket.org/pypy/pypy/changeset/f8c92c646275/

Log:    Added a function to test whether we are on a 64 bit system or not.
        Could be useful for skipping tests which are supposed to pass on 64
        bit only.

diff --git a/pypy/jit/backend/ppc/ppcgen/test/test_ppc.py 
b/pypy/jit/backend/ppc/ppcgen/test/test_ppc.py
--- a/pypy/jit/backend/ppc/ppcgen/test/test_ppc.py
+++ b/pypy/jit/backend/ppc/ppcgen/test/test_ppc.py
@@ -283,7 +283,8 @@
         lltype.free(p, flavor="raw")
 
     def test_ld(self):
-        py.test.skip("maybe works on 64 bit?")
+        if not is_64_bit_arch():
+            py.test.skip("maybe works on 64 bit?")
         a = PPCBuilder()
 
         p = lltype.malloc(rffi.CArray(rffi.INT), 1, flavor="raw")
@@ -316,6 +317,11 @@
 
 def func(arg):
     return arg + 15
+
+def is_64_bit_arch():
+    import sys
+    return sys.maxint == 9223372036854775807
+       
 """
 class TestAssemble(object):
         
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to