# HG changeset patch # User raptorbot # Date 1263832822 0 # Node ID e8506cb183056b7e72006f25f05765ecb1579387 # Parent 4f2ae0d78608ece1f390da12d3fcecc5f6e7940e# Parent ab4f8683701c562d73e3903e37390f885eb9fc10 Merge diff -r ab4f8683701c -r e8506cb18305 sbsv2/raptor/python/raptor_make.py --- a/sbsv2/raptor/python/raptor_make.py Mon Jan 18 16:15:37 2010 +0000 +++ b/sbsv2/raptor/python/raptor_make.py Mon Jan 18 16:40:22 2010 +0000 @@ -458,7 +458,8 @@ command += " " + " ".join(addTargets) # Send stderr to a file so that it can't mess up the log (e.g. - # clock skew messages from some build engines. + # clock skew messages from some build engines scatter their + # output across our xml. stderrfilename = makefile+'.stderr' command += " 2>'%s' " % stderrfilename @@ -504,13 +505,6 @@ line = stream.readline() self.raptor.out.write(line) - try: - e = open(stderrfilename,"r") - for line in e: - self.raptor.out.write(escape(line)) - e.close() - except Exception,e: - self.raptor.Error("Couldn't complete stderr output for %s - '%s'", str(e), command) # should be done now returncode = p.wait() @@ -519,6 +513,17 @@ self.raptor.InfoEndTime(object_type = "makefile", task = "build", key = str(makefile)) + # 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. + try: + e = open(stderrfilename,"r") + for line in e: + self.raptor.out.write(escape(line)) + e.close() + except Exception,e: + self.raptor.Error("Couldn't complete stderr output for %s - '%s'", command, str(e)) + if returncode != 0 and not self.raptor.keepGoing: self.Tidy() return False