[pypy-svn] r79125 - in pypy/release/1.4.x: . lib_pypy/ctypes_config_cache/test pypy pypy/jit/metainterp/optimizeopt pypy/module/array/benchmark pypy/module/array/test pypy/rlib pypy/rlib/test

fijal at codespeak.net fijal at codespeak.net
Mon Nov 15 20:06:43 CET 2010


Author: fijal
Date: Mon Nov 15 20:06:41 2010
New Revision: 79125

Modified:
   pypy/release/1.4.x/   (props changed)
   pypy/release/1.4.x/lib_pypy/ctypes_config_cache/test/test_cache.py
   pypy/release/1.4.x/pypy/   (props changed)
   pypy/release/1.4.x/pypy/jit/metainterp/optimizeopt/optimizer.py   (props changed)
   pypy/release/1.4.x/pypy/module/array/benchmark/Makefile   (props changed)
   pypy/release/1.4.x/pypy/module/array/benchmark/intimg.c   (props changed)
   pypy/release/1.4.x/pypy/module/array/benchmark/intimgtst.c   (props changed)
   pypy/release/1.4.x/pypy/module/array/benchmark/intimgtst.py   (props changed)
   pypy/release/1.4.x/pypy/module/array/benchmark/loop.c   (props changed)
   pypy/release/1.4.x/pypy/module/array/benchmark/sum.c   (props changed)
   pypy/release/1.4.x/pypy/module/array/benchmark/sumtst.c   (props changed)
   pypy/release/1.4.x/pypy/module/array/benchmark/sumtst.py   (props changed)
   pypy/release/1.4.x/pypy/module/array/test/test_array_old.py   (props changed)
   pypy/release/1.4.x/pypy/rlib/rerased.py   (props changed)
   pypy/release/1.4.x/pypy/rlib/test/test_rerased.py   (props changed)
Log:
merge 78988 from trunk

Modified: pypy/release/1.4.x/lib_pypy/ctypes_config_cache/test/test_cache.py
==============================================================================
--- pypy/release/1.4.x/lib_pypy/ctypes_config_cache/test/test_cache.py	(original)
+++ pypy/release/1.4.x/lib_pypy/ctypes_config_cache/test/test_cache.py	Mon Nov 15 20:06:41 2010
@@ -7,9 +7,8 @@
 
 def run(filename, outputname):
     filepath = dirpath.join(filename)
-    tmpdir2 = udir.ensure('testcache-' + filename, dir=True)
-    tmpdir = tmpdir2.ensure('ctypes_config_cache', dir=True)
-    tmpdir.join('__init__.py').write('\n')
+    tmpdir = udir.ensure('testcache-' + os.path.splitext(filename)[0],
+                         dir=True)
     tmpdir.join('dumpcache.py').write(dirpath.join('dumpcache.py').read())
     path = sys.path[:]
     try:
@@ -23,14 +22,12 @@
     assert outputpath.check(exists=1)
     modname = os.path.splitext(outputname)[0]
     try:
-        sys.path.insert(0, str(tmpdir2))
+        sys.path.insert(0, str(tmpdir))
         d = {}
-        exec "from ctypes_config_cache import %s" % modname in d
-        mod = d[modname]
+        execfile(str(outputpath), d)
     finally:
         sys.path[:] = path
-        sys.modules.pop('ctypes_config_cache', None)
-    return mod.__dict__
+    return d
 
 
 def test_syslog():



More information about the Pypy-commit mailing list