--- a/sbsv2/raptor/python/raptor_make.py Mon Mar 15 13:09:36 2010 +0000
+++ b/sbsv2/raptor/python/raptor_make.py Mon Mar 15 13:13:18 2010 +0000
@@ -479,7 +479,9 @@
# clock skew messages from some build engines scatter their
# output across our xml.
stderrfilename = makefile+'.stderr'
+ stdoutfilename = makefile+'.stdout'
command += " 2>'%s' " % stderrfilename
+ command += " >'%s' " % stdoutfilename
# Substitute the makefile name for any occurrence of #MAKEFILE#
command = command.replace("#MAKEFILE#", str(makefile))
@@ -517,22 +519,9 @@
universal_newlines=True, env=makeenv)
stream = p.stdout
- inRecipe = False
line = " "
while line:
line = stream.readline()
-
- if line.startswith("<recipe"):
- inRecipe = True
- elif line.startswith("</recipe"):
- inRecipe = False
-
- # unless we are inside a "recipe", any line not starting
- # with "<" is free text that must be escaped.
- if inRecipe or line.startswith("<"):
- self.raptor.out.write(line)
- else:
- self.raptor.out.write(escape(line))
# should be done now
returncode = p.wait()
@@ -541,6 +530,30 @@
self.raptor.InfoEndTime(object_type = "makefile",
task = "build", key = str(makefile))
+ try:
+ e = open(stdoutfilename,"r")
+ inRecipe = False
+ for line in e:
+ if line.startswith("<recipe"):
+ inRecipe = True
+ elif line.startswith("</recipe"):
+ inRecipe = False
+
+ # unless we are inside a "recipe", any line not starting
+ # with "<" is free text that must be escaped.
+ if inRecipe or line.startswith("<"):
+ self.raptor.out.write(line)
+ else:
+ self.raptor.out.write(escape(line))
+ e.close()
+ except Exception,e:
+ self.raptor.Error("Couldn't complete stdout output for %s - '%s'", command, str(e))
+
+ if returncode != 0 and not self.raptor.keepGoing:
+ self.Tidy()
+ return False
+
+
# Take all the stderr output that went into the .stderr file
# and put it back into the log, but safely so it can't mess up
# xml parsers.