Author: Manuel Jacob
Branch: llvm-translation-backend
Changeset: r68886:7ef5897257d5
Date: 2014-01-23 22:22 +0100
http://bitbucket.org/pypy/pypy/changeset/7ef5897257d5/
Log: Don't run RTyper tests on top of GenLLVM. GenC doesn't, neither.
They are too high-level and required some hacks to be runnable on
GenLLVM. These hacks will be removed in the next commit.
diff --git a/rpython/translator/llvm/test/test_genllvm.py
b/rpython/translator/llvm/test/test_genllvm.py
--- a/rpython/translator/llvm/test/test_genllvm.py
+++ b/rpython/translator/llvm/test/test_genllvm.py
@@ -8,17 +8,12 @@
r_longfloat)
from rpython.rlib.test.test_longlong2float import enum_floats, fn, fnsingle
from rpython.rtyper.lltypesystem import lltype, rffi, llmemory
-from rpython.rtyper.lltypesystem.ll2ctypes import (force_cast, get_ctypes_type,
+from rpython.rtyper.lltypesystem.ll2ctypes import (get_ctypes_type,
lltype2ctypes, ctypes2lltype)
from rpython.rtyper.rtuple import TupleRepr
from rpython.rtyper.lltypesystem.rstr import StringRepr, UnicodeRepr
from rpython.rtyper.lltypesystem.test.test_rffi import BaseTestRffi
from rpython.rtyper.module.support import LLSupport
-from rpython.rtyper.test import (test_annlowlevel, test_exception,
- test_generator, test_rbool, test_rbuilder, test_rbuiltin, test_rclass,
- test_rconstantdict, test_rdict, test_remptydict, test_rfloat,
- test_rint, test_rlist, test_rpbc, test_rrange, test_rstr,
- test_rtuple, test_runicode, test_rvirtualizable, test_rweakref)
from rpython.rtyper.typesystem import getfunctionptr
from rpython.translator.backendopt.all import backend_optimizations
from rpython.translator.backendopt.raisingop2direct_call import (
@@ -369,15 +364,6 @@
self._types = types
return self._compiled
- def interpret(self, func, args, **kwds):
- fc = self._compile(func, args, **kwds)
- return fc(*args)
-
- def interpret_raises(self, exception, func, args, **kwds):
- fc = self._compile(func, args, **kwds)
- with py.test.raises(exception):
- fc(*args)
-
@property
def translator(self):
return self._translator
@@ -741,107 +727,3 @@
if t is not None:
py.test.skip('not supported yet')
return self.getcompiled(fn, inputtypes, gcpolicy='ref')
-
-
-class TestRtypingLLVM(_LLVMMixin, test_annlowlevel.TestLLType):
- pass
-
-class TestExceptionLLVM(_LLVMMixin, test_exception.TestException):
- def test_raise_and_catch_other(self):
- py.test.skip('Impossible to pass if not running on LLInterpreter.')
-
- def test_raise_prebuilt_and_catch_other(self):
- py.test.skip('Impossible to pass if not running on LLInterpreter.')
-
-class TestGeneratorLLVM(_LLVMMixin, test_generator.TestGenerator):
- pass
-
-class TestRboolLLVM(_LLVMMixin, test_rbool.TestRbool):
- pass
-
-class TestStringBuilderLLVM(_LLVMMixin, test_rbuilder.TestStringBuilder):
- pass
-
-class TestRbuiltinLLVM(_LLVMMixin, test_rbuiltin.TestRbuiltin):
- def test_debug_llinterpcall(self):
- py.test.skip('Impossible to pass if not running on LLInterpreter.')
-
-class TestRclassLLVM(_LLVMMixin, test_rclass.TestRclass):
- pass
-
-class TestRconstantdictLLVM(_LLVMMixin, test_rconstantdict.TestRconstantdict):
- pass
-
-class TestRdictLLVM(_LLVMMixin, test_rdict.TestRDict):
- def test_memoryerror_should_not_insert(self):
- py.test.skip('Impossible to pass if not running on LLInterpreter.')
-
-class TestRemptydictLLVM(_LLVMMixin, test_remptydict.TestRemptydict):
- pass
-
-class TestRfloatLLVM(_LLVMMixin, test_rfloat.TestRfloat):
- pass
-
-class TestRintLLVM(_LLVMMixin, test_rint.TestRint):
- pass
-
-class TestRlistLLVM(_LLVMMixin, test_rlist.TestRlist):
- def test_iterate_over_immutable_list(self):
- py.test.skip('Impossible to pass if not running on LLInterpreter.')
-
- def test_iterate_over_immutable_list_quasiimmut_attr(self):
- py.test.skip('Impossible to pass if not running on LLInterpreter.')
-
- def test_getitem_exc_1(self):
- py.test.skip('Impossible to pass if not running on LLInterpreter.')
-
- def test_getitem_exc_2(self):
- py.test.skip('Impossible to pass if not running on LLInterpreter.')
-
- def list_is_clear(self, lis, idx):
- items = lis._obj.items
- for i in range(idx, lis._obj.length):
- if items[i]._obj is not None:
- return False
- return True
-
-class TestRPBCLLVM(_LLVMMixin, test_rpbc.TestRPBC):
- def read_attr(self, value, attr_name):
- class_name = 'pypy.rpython.test.test_rpbc.' + self.class_name(value)
- for (cd, _), ir in self._translator.rtyper.instance_reprs.items():
- if cd is not None and cd.name == class_name:
- value = force_cast(ir.lowleveltype, value)
-
- value = value._obj
- while value is not None:
- attr = getattr(value, "inst_" + attr_name, None)
- if attr is None:
- value = value.super
- else:
- return attr
- raise AttributeError()
-
-class TestRPBCExtraLLVM(_LLVMMixin, test_rpbc.TestRPBCExtra):
- pass
-
-class TestRrangeLLVM(_LLVMMixin, test_rrange.TestRrange):
- pass
-
-class TestRstrLLVM(_LLVMMixin, test_rstr.TestRstr):
- def test_getitem_exc(self):
- py.test.skip('Impossible to pass if not running on LLInterpreter.')
-
-class TestRtupleLLVM(_LLVMMixin, test_rtuple.TestRtuple):
- pass
-
-class TestRUnicodeLLVM(_LLVMMixin, test_runicode.TestRUnicode):
- def test_getitem_exc(self):
- py.test.skip('Impossible to pass if not running on LLInterpreter.')
-
-class TestRvirtualizableLLVM(_LLVMMixin,
test_rvirtualizable.TestVirtualizable):
- pass
-
-class TestRweakrefLLVM(_LLVMMixin, test_rweakref.TestRweakref):
- def _compile(self, *args, **kwds):
- kwds['gcpolicy'] = 'minimark'
- return _LLVMMixin._compile(self, *args, **kwds)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit