[pypy-commit] pypy stmgc-c4: Skip this test when running on top of CPython
arigo
noreply at buildbot.pypy.org
Thu Sep 5 15:55:29 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c4
Changeset: r66801:7f9388621e23
Date: 2013-09-05 15:45 +0200
http://bitbucket.org/pypy/pypy/changeset/7f9388621e23/
Log: Skip this test when running on top of CPython
diff --git a/pypy/module/__pypy__/test/test_signal.py b/pypy/module/__pypy__/test/test_signal.py
--- a/pypy/module/__pypy__/test/test_signal.py
+++ b/pypy/module/__pypy__/test/test_signal.py
@@ -25,6 +25,9 @@
__pypy__.thread._signals_enter()
def test_enable_signals(self):
+ if not self.run_on_pypy:
+ skip("needs non-main-thread signals")
+
import __pypy__, thread, signal, time, sys
def subthread():
diff --git a/pypy/module/thread/test/support.py b/pypy/module/thread/test/support.py
--- a/pypy/module/thread/test/support.py
+++ b/pypy/module/thread/test/support.py
@@ -1,7 +1,7 @@
import gc
import time
import thread
-import os
+import os, sys
import errno
from pypy.interpreter.gateway import interp2app, unwrap_spec
@@ -60,6 +60,7 @@
def py_timeout_killer(self, *args, **kwargs):
timeout_killer(*args, **kwargs)
cls.w_timeout_killer = cls.space.wrap(py_timeout_killer)
+ run_on_pypy = True
else:
@unwrap_spec(delay=int)
def py_waitfor(space, w_condition, delay=1):
@@ -75,8 +76,10 @@
])
timeout_killer(*args, **kwargs)
cls.w_timeout_killer = cls.space.wrap(interp2app(py_timeout_killer))
+ run_on_pypy = '__pypy__' in sys.builtin_module_names
cls.w_busywait = cls.space.appexec([], """():
import time
return time.sleep
""")
+ cls.w_run_on_pypy = cls.space.wrap(run_on_pypy)
More information about the pypy-commit
mailing list