Commits

Armin Rigo committed a2e6e96

More tests to skip when running untranslated in a real backend...

Comments (0)

Files changed (2)

pypy/jit/metainterp/test/test_virtualizable.py

         self.check_aborted_count(3)
         self.check_jitcell_token_count(0)
 
+    def _skip_if_untranslated_on_a_real_backend(self):
+        if not hasattr(self.CPUClass, 'is_llgraph'):
+            py.test.skip("xxx only works on the llgraph backend, or "
+                         "fully translated")
+
     def test_external_read_sometimes(self):
+        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['frame'],
                               virtualizables = ['frame'])
         
         assert res == f(123)
 
     def test_external_read_sometimes_with_virtuals(self):
+        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['frame'],
                               virtualizables = ['frame'])
         
         assert res == f(123)
 
     def test_external_read_sometimes_changing_virtuals(self):
+        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['frame'],
                               virtualizables = ['frame'])
         
         assert res == f(123)
 
     def test_external_read_sometimes_with_exception(self):
+        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['frame'],
                               virtualizables = ['frame'])
         
         assert res == f(123)
 
     def test_external_read_sometimes_dont_compile_guard(self):
+        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['frame'],
                               virtualizables = ['frame'])
         
         assert res == f(123)
 
     def test_external_read_sometimes_recursive(self):
+        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['rec', 'frame'],
                               virtualizables = ['frame'])
         
         assert res == main(123)
 
     def test_external_write_sometimes(self):
+        self._skip_if_untranslated_on_a_real_backend()
         jitdriver = JitDriver(greens = [], reds = ['frame'],
                               virtualizables = ['frame'])
         

pypy/jit/metainterp/test/test_virtualref.py

                           new_array=6)         # next1/2/3
         self.check_aborted_count(0)
 
+    def _skip_if_untranslated_on_a_real_backend(self):
+        if not hasattr(self.CPUClass, 'is_llgraph'):
+            py.test.skip("xxx only works on the llgraph backend, or "
+                         "fully translated")
+
     def test_simple_force_sometimes(self):
+        self._skip_if_untranslated_on_a_real_backend()
         myjitdriver = JitDriver(greens = [], reds = ['n'])
         #
         A = lltype.GcArray(lltype.Signed)
         self.check_aborted_count(0)
 
     def test_alloc_virtualref_and_then_alloc_structure(self):
+        self._skip_if_untranslated_on_a_real_backend()
         myjitdriver = JitDriver(greens = [], reds = ['n'])
         #
         class XY:
         py.test.raises(UnknownException, "self.meta_interp(fn, [10])")
 
     def test_call_virtualref_already_forced(self):
+        self._skip_if_untranslated_on_a_real_backend()
         myjitdriver = JitDriver(greens = [], reds = ['n', 'res'])
         #
         class XY: