[pypy-svn] r68721 - pypy/trunk/pypy/translator/jvm

antocuni at codespeak.net antocuni at codespeak.net
Fri Oct 23 16:49:39 CEST 2009


Author: antocuni
Date: Fri Oct 23 16:49:38 2009
New Revision: 68721

Modified:
   pypy/trunk/pypy/translator/jvm/genjvm.py
Log:
use an unique directory for each test to store the files


Modified: pypy/trunk/pypy/translator/jvm/genjvm.py
==============================================================================
--- pypy/trunk/pypy/translator/jvm/genjvm.py	(original)
+++ pypy/trunk/pypy/translator/jvm/genjvm.py	Fri Oct 23 16:49:38 2009
@@ -9,6 +9,7 @@
 from py.compat import subprocess
 from pypy.tool.udir import udir
 from pypy.translator.translator import TranslationContext
+from pypy.translator.gensupp import uniquemodulename
 from pypy.translator.oosupport.genoo import GenOO
 from pypy.translator.backendopt.all import backend_optimizations
 from pypy.translator.backendopt.checkvirtual import check_virtual_methods
@@ -225,8 +226,11 @@
         backend_optimizations(t)
     main_graph = t.graphs[0]
     if getoption('view'): t.view()
-    if getoption('wd'): tmpdir = py.path.local('.')
-    else: tmpdir = udir
+    if getoption('wd'):
+        tmpdir = py.path.local('.')
+    else:
+        dirname = uniquemodulename('jvm_testing')
+        tmpdir = udir.ensure(dirname, dir=1)
     jvm = GenJvm(tmpdir, t, EntryPoint(main_graph, True, True))
     return jvm.generate_source()
 



More information about the Pypy-commit mailing list