Author: Armin Rigo <[email protected]>
Branch: stmgc-c8
Changeset: r76223:6b6e9194be71
Date: 2015-03-02 18:32 +0100
http://bitbucket.org/pypy/pypy/changeset/6b6e9194be71/

Log:    Don't run the pinning tests with STM, where the nursery objects
        cannot be pinned at all.

diff --git a/rpython/jit/backend/llsupport/test/zrpy_gc_test.py 
b/rpython/jit/backend/llsupport/test/zrpy_gc_test.py
--- a/rpython/jit/backend/llsupport/test/zrpy_gc_test.py
+++ b/rpython/jit/backend/llsupport/test/zrpy_gc_test.py
@@ -220,6 +220,12 @@
     def run_orig(self, name, n, x):
         self.main_allfuncs(name, n, x)
 
+    def can_pin(self):
+        """Don't run the pinning tests with STM,
+        where the nursery objects cannot be pinned at all.
+        """
+        return self.gcrootfinder != 'stm'
+
 
 class CompileFrameworkTests(BaseFrameworkTests):
     # Test suite using (so far) the minimark GC.
@@ -921,7 +927,8 @@
         return None, fn, None
 
     def test_pinned_simple(self):
-        self.run('pinned_simple')
+        if self.can_pin():
+            self.run('pinned_simple')
 
     def define_pinned_unpin(cls):
         class H:
@@ -965,7 +972,8 @@
         return None, fn, after
 
     def test_pinned_unpin(self):
-        self.run('pinned_unpin')
+        if self.can_pin():
+            self.run('pinned_unpin')
 
     def define_multiple_pinned(cls):
         class H:
@@ -1012,4 +1020,5 @@
         return None, fn, None
 
     def test_multiple_pinned(self):
-        self.run('multiple_pinned')
+        if self.can_pin():
+            self.run('multiple_pinned')
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to