gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosim...@apache.org
Subject svn commit: r165533 - /gump/branches/Gump3/pygump/python/gump/test/testPluginBuilder.py
Date Sun, 01 May 2005 18:05:15 GMT
Author: leosimons
Date: Sun May  1 11:05:14 2005
New Revision: 165533

URL: http://svn.apache.org/viewcvs?rev=165533&view=rev
Log:
Potential fix for GUMP-122.

* pygump/python/gump/test/testPluginBuilder.py: write a .bat file for windows so the test
hopefully runs. Not verified as I don't have access to windows at the moment.

Modified:
    gump/branches/Gump3/pygump/python/gump/test/testPluginBuilder.py

Modified: gump/branches/Gump3/pygump/python/gump/test/testPluginBuilder.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/test/testPluginBuilder.py?rev=165533&r1=165532&r2=165533&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/test/testPluginBuilder.py (original)
+++ gump/branches/Gump3/pygump/python/gump/test/testPluginBuilder.py Sun May  1 11:05:14 2005
@@ -23,6 +23,7 @@
 from tempfile import mkdtemp
 import stat
 import os
+import sys
 from os import mkdir
 from os import makedirs
 from os.path import abspath
@@ -47,14 +48,21 @@
             mpath = join(basedir,w.name,r.name,m.name)
             mkdir(mpath)
             p = Project(m,"p")
-            scriptpath = join(mpath,"dobuild")
-            scriptfile = open(scriptpath, mode='w')
-            scriptfile.write("""#!/bin/sh
-
+            if sys.platform == "win32":
+                scriptpath = join(mpath,"dobuild.bat")
+                scriptfile = open(scriptpath, mode='w')
+                scriptfile.write("""echo off
+echo RESULT
+""")
+            else:
+                scriptpath = join(mpath,"dobuild")
+                scriptfile = open(scriptpath, mode='w')
+                scriptfile.write("""#!/bin/sh
+    
 echo RESULT
 """)
-            scriptfile.close()
-            os.chmod(scriptpath, 0755)
+                scriptfile.close()
+                os.chmod(scriptpath, 0755)
 
             plugin = ScriptBuilderPlugin(basedir, self.mock())
 



Mime
View raw message