[pypy-commit] pypy stmgc-c7: Tweaks

arigo noreply at buildbot.pypy.org
Fri Mar 27 18:42:02 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r76595:3723af2273db
Date: 2015-03-27 18:12 +0100
http://bitbucket.org/pypy/pypy/changeset/3723af2273db/

Log:	Tweaks

diff --git a/pypy/module/pypystm/test_pypy_c/support.py b/pypy/module/pypystm/test_pypy_c/support.py
--- a/pypy/module/pypystm/test_pypy_c/support.py
+++ b/pypy/module/pypystm/test_pypy_c/support.py
@@ -56,7 +56,7 @@
     while len(result) != NUM_THREADS:
         barrier(tnum, done=True)
 
-def run_in_threads(function, arg_thread_num=False, arg_class=None):
+def _run_in_threads(function, arg_thread_num=False, arg_class=None):
     locks = []
     result = []
     for i in range(NUM_THREADS):
@@ -73,6 +73,13 @@
         lock._py3k_acquire(timeout=30)
     if len(result) < len(locks):
         raise Exception("not all threads completed successfully")
+
+def run_in_threads(*args, **kwds):
+    import time
+    try:
+        _run_in_threads(*args, **kwds)
+    finally:
+        time.sleep(0.5)
 """
 
     def setup_class(cls):
@@ -112,16 +119,17 @@
         print '*', ' '.join(cmdline)
         env = os.environ.copy()
         env['PYPYSTM'] = str(self.stmfile)
-        env['PYPYLOG'] = str(self.logfile)
+        #env['PYPYLOG'] = str(self.logfile)
         #
         pipe = subprocess.Popen(cmdline,
-                                env=env,
-                                stdout=subprocess.PIPE,
-                                stderr=subprocess.PIPE)
-        stdout, stderr = pipe.communicate()
+                                env=env)
+#                                stdout=subprocess.PIPE,
+#                                stderr=subprocess.PIPE)
+#        stdout, stderr = pipe.communicate()
+        pipe.wait()
         if pipe.returncode > 0:
             raise IOError("subprocess error %d:\n%s" % (pipe.returncode,
-                                                        stderr))
+                                                        '(see stderr)')) #stderr))
         if pipe.returncode < 0:
             raise IOError("subprocess was killed by signal %d" % (
                 pipe.returncode,))


More information about the pypy-commit mailing list