[pypy-svn] r57236 - pypy/dist/pypy/translator/microbench

fijal at codespeak.net fijal at codespeak.net
Thu Aug 14 09:50:28 CEST 2008


Author: fijal
Date: Thu Aug 14 09:50:26 2008
New Revision: 57236

Modified:
   pypy/dist/pypy/translator/microbench/microbench.py
   pypy/dist/pypy/translator/microbench/test_dispatch.py
Log:
this rather harmless changes fixes issue385


Modified: pypy/dist/pypy/translator/microbench/microbench.py
==============================================================================
--- pypy/dist/pypy/translator/microbench/microbench.py	(original)
+++ pypy/dist/pypy/translator/microbench/microbench.py	Thu Aug 14 09:50:26 2008
@@ -23,7 +23,7 @@
     this_dir = os.path.dirname(sys.argv[0])
 
 microbenches = []
-for fname in os.listdir('.'):
+for fname in os.listdir(this_dir):
     if not fname.startswith('test_') or not fname.endswith('.py'):
         continue
     microbench = fname[:-3]
@@ -74,7 +74,9 @@
 
     for n, exe in enumerate(executables):
         print 'exe:', exe
-        data = [s for s in os.popen(exe + ' microbench.py -Fr %s 2>&1' % limit).readlines() if not s.startswith('debug:')]
+        data = [s for s in os.popen('%s %s -Fr %s 2>&1' %
+            (exe, os.path.join(this_dir, 'microbench.py'), limit)).readlines()
+                if not s.startswith('debug:')]
         benchdata = {}
         for d in data:
             try:

Modified: pypy/dist/pypy/translator/microbench/test_dispatch.py
==============================================================================
--- pypy/dist/pypy/translator/microbench/test_dispatch.py	(original)
+++ pypy/dist/pypy/translator/microbench/test_dispatch.py	Thu Aug 14 09:50:26 2008
@@ -1,9 +1,10 @@
 try:
     import dis
+    import new
 except ImportError:
     pass
 else:
-    import new, sys
+    import sys
 
     N_NOPS = 10**7
     N = int(50)



More information about the Pypy-commit mailing list