gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r158497 - in gump/trunk/python/gump: core/language/java.py util/process/launcher.py
Date Mon, 21 Mar 2005 18:20:05 GMT
Author: ajack
Date: Mon Mar 21 10:20:05 2005
New Revision: 158497

URL: http://svn.apache.org/viewcvs?view=rev&rev=158497
Log:
Capture stdout on Linux (with new invoke mechanism)

Modified:
    gump/trunk/python/gump/core/language/java.py
    gump/trunk/python/gump/util/process/launcher.py

Modified: gump/trunk/python/gump/core/language/java.py
URL: http://svn.apache.org/viewcvs/gump/trunk/python/gump/core/language/java.py?view=diff&r1=158496&r2=158497
==============================================================================
--- gump/trunk/python/gump/core/language/java.py (original)
+++ gump/trunk/python/gump/core/language/java.py Mon Mar 21 10:20:05 2005
@@ -233,9 +233,9 @@
             if   (  ( ( 1 == depth ) and \
                  	(inherit in [ gump.core.model.depend.INHERIT_ALL, gump.core.model.depend.INHERIT_HARD
]) \
                     	or \
-                    (inherit==gump.core.model.depend.INHERIT_RUNTIME and subdependency.isRuntime())
) \
+                    (inherit == gump.core.model.depend.INHERIT_RUNTIME and subdependency.isRuntime())
) \
                    or \
-                   	( inherit == gump.core.model.depend.INHERIT_OUTPUTS ) ) :      
+                   	( inherit in [ gump.core.model.depend.INHERIT_OUTPUTS ] ) ) :      
                 (subcp, subbcp) = self._getDependOutputList(project,subdependency,visited,depth+1,debug)
                 self._importClasspaths(classpath,bootclasspath,subcp,subbcp)   
             elif debug:

Modified: gump/trunk/python/gump/util/process/launcher.py
URL: http://svn.apache.org/viewcvs/gump/trunk/python/gump/util/process/launcher.py?view=diff&r1=158496&r2=158497
==============================================================================
--- gump/trunk/python/gump/util/process/launcher.py (original)
+++ gump/trunk/python/gump/util/process/launcher.py Mon Mar 21 10:20:05 2005
@@ -63,6 +63,8 @@
             f = open(execFile, 'w')
             # The CMD
             f.write( 'CMD: %s\n' % (execString))
+            # The OUTPUT
+            f.write( 'OUTPUT: %s\n' % (outputFile))
             # Dump the TMP
             if tmp: f.write( 'TMP: %s\n' % (tmp))
             # Dump the cwd (if specified)
@@ -133,7 +135,7 @@
         else:
             
             # Run another python process (to crap into it's ENV not the main, multi-threaded,
one.)
-            fullExec = sys.executable + ' ' + LAUNCHER + ' ' + execFile + ' >>' + str(outputFile)
+ ' 2>&1'
+            fullExec = sys.executable + ' ' + LAUNCHER + ' ' + execFile
                                     
             #log.debug('Executing: ' + execString)
             #log.debug('     Exec: ' + str(execFile))
@@ -233,6 +235,7 @@
         #    print 'KEY : ' + key  + ' -> ' + execInfo[key]
         
         cmd = execInfo['CMD']
+        outputFile = execInfo['OUTPUT']
         cwd = None
         if execInfo.has_key('CWD'): cwd = execInfo['CWD']
         tmp = execInfo['TMP']
@@ -261,6 +264,9 @@
             timer.setDaemon(1)
             timer.start()
             
+        # Allow redirect
+        cmd += ' >>' + str(outputFile) + ' 2>&1'
+        
         # Run the command
         systemReturn = os.system(cmd)
                   



Mime
View raw message