Author: Armin Rigo <[email protected]>
Branch:
Changeset: r89296:7a93d726ec2a
Date: 2017-01-02 14:54 +0000
http://bitbucket.org/pypy/pypy/changeset/7a93d726ec2a/
Log: Skip this test if Boehm is too old
diff --git a/rpython/rlib/test/test_rawrefcount_boehm.py
b/rpython/rlib/test/test_rawrefcount_boehm.py
--- a/rpython/rlib/test/test_rawrefcount_boehm.py
+++ b/rpython/rlib/test/test_rawrefcount_boehm.py
@@ -1,8 +1,23 @@
-import itertools, os, subprocess
+import itertools, os, subprocess, py
from hypothesis import given, strategies
from rpython.tool.udir import udir
+def setup_module():
+ filename = str(udir.join("test-rawrefcount-boehm-check.c"))
+ with open(filename, "w") as f:
+ print >> f, '#include "gc/gc_mark.h"'
+ print >> f, 'void *testing(void) {'
+ print >> f, ' return &GC_set_start_callback;'
+ print >> f, '}'
+
+ err = os.system("cd '%s' && gcc -c test-rawrefcount-boehm-check.c"
+ % (udir,))
+ if err != 0:
+ py.test.skip("Boehm GC not installed or too old version")
+
+
+
TEST_CODE = r"""
#define TEST_BOEHM_RAWREFCOUNT
#include "boehm-rawrefcount.c"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit