[pypy-svn] r40767 - in pypy/dist/pypy/tool/build/testproject: . bin

guido at codespeak.net guido at codespeak.net
Mon Mar 19 13:50:39 CET 2007


Author: guido
Date: Mon Mar 19 13:50:33 2007
New Revision: 40767

Modified:
   pypy/dist/pypy/tool/build/testproject/   (props changed)
   pypy/dist/pypy/tool/build/testproject/__init__.py   (props changed)
   pypy/dist/pypy/tool/build/testproject/bin/   (props changed)
   pypy/dist/pypy/tool/build/testproject/bin/autopath.py   (props changed)
   pypy/dist/pypy/tool/build/testproject/bin/buildserver.py   (contents, props changed)
   pypy/dist/pypy/tool/build/testproject/bin/metaserver.py   (contents, props changed)
   pypy/dist/pypy/tool/build/testproject/bin/startcompile.py   (props changed)
   pypy/dist/pypy/tool/build/testproject/compileoption.py   (props changed)
   pypy/dist/pypy/tool/build/testproject/config.py   (contents, props changed)
   pypy/dist/pypy/tool/build/testproject/systemoption.py   (props changed)
   pypy/dist/pypy/tool/build/testproject/tooloption.py   (props changed)
Log:
Test project is now working.


Modified: pypy/dist/pypy/tool/build/testproject/bin/buildserver.py
==============================================================================
--- pypy/dist/pypy/tool/build/testproject/bin/buildserver.py	(original)
+++ pypy/dist/pypy/tool/build/testproject/bin/buildserver.py	Mon Mar 19 13:50:33 2007
@@ -8,27 +8,28 @@
 def compile(wc, compileinfo, buildpath):
     code = """\
         import os
-        
         import py
 
-        # interpolating the path
-        wc = py.path.local(%r)
         try:
-            os.chdir(str(wc))
+            # interpolating the path
+            wc = py.path.local(%r)
+            os.chdir(str(wc.join('test')))
             try:
                 output = py.process.cmdexec("gcc -o test test.c")
             except Exception, e:
                 output = str(e)
-            upath = wc.join('test')
+                channel.send(None)
+            else:
+                tempdir = py.test.ensuretemp('compile_testproject_result')
+                exe = wc.join('test/test')
+                exe.copy(tempdir)
+                channel.send(str(tempdir))
             channel.send(output)
-            channel.send(str(upath))
         finally:
             channel.close()
     """
     gw = PopenGateway()
-    interpolated = py.code.Source(outputbuffer,
-                                  code % (str(wc), compileinfo,
-                                  str(buildpath)))
+    interpolated = py.code.Source(outputbuffer,  code % (str(wc),))
     channel = gw.remote_exec(interpolated)
     try:
         upath = channel.receive()

Modified: pypy/dist/pypy/tool/build/testproject/bin/metaserver.py
==============================================================================
--- pypy/dist/pypy/tool/build/testproject/bin/metaserver.py	(original)
+++ pypy/dist/pypy/tool/build/testproject/bin/metaserver.py	Mon Mar 19 13:50:33 2007
@@ -3,5 +3,7 @@
 from pypy.tool.build.testproject import config
 from pypy.tool.build.metaserver import main
 
+print 'buildpath:', config.buildpath
+
 main(config)
 

Modified: pypy/dist/pypy/tool/build/testproject/config.py
==============================================================================
--- pypy/dist/pypy/tool/build/testproject/config.py	(original)
+++ pypy/dist/pypy/tool/build/testproject/config.py	Mon Mar 19 13:50:33 2007
@@ -63,3 +63,5 @@
     return 'http://localhost/testproject/%s/data.zip' % (
                 p.relto(py.magic.autopath().dirpath()),)
 
+configpath = 'pypy.tool.build.testproject.config'
+



More information about the Pypy-commit mailing list