# HG changeset patch # User raptorbot # Date 1263832792 0 # Node ID 4f2ae0d78608ece1f390da12d3fcecc5f6e7940e # Parent d7a63891e2e6b45e7a5ef632abaa34ba7ad2edf0 fix: add .stderr dumfile to log *after* make engine has exited. diff -r d7a63891e2e6 -r 4f2ae0d78608 sbsv2/raptor/python/raptor_make.py --- a/sbsv2/raptor/python/raptor_make.py Mon Jan 18 00:22:30 2010 +0000 +++ b/sbsv2/raptor/python/raptor_make.py Mon Jan 18 16:39:52 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