sbsv2/raptor/python/raptor_make.py
branchfix
changeset 360 77642c41e033
parent 357 b4baa7ca35a7
child 408 a819f9223567
child 443 2f5cedd04db9
--- a/sbsv2/raptor/python/raptor_make.py	Mon Mar 15 15:52:03 2010 +0000
+++ b/sbsv2/raptor/python/raptor_make.py	Mon Mar 15 16:32:51 2010 +0000
@@ -31,6 +31,7 @@
 import traceback
 import sys
 from xml.sax.saxutils import escape
+from xml.sax.saxutils import unescape
 
 
 class BadMakeEngineException(Exception):
@@ -139,8 +140,9 @@
 
 			if self.copyLogFromAnnoFile:
 				for o in self.raptor.makeOptions:
-					if o.startswith("--mo=--emake-annofile="):
-						self.annoFileName = o[22:]
+					if o.startswith("--emake-annofile="):
+						self.annoFileName = o[17:]
+						self.raptor.Info("annofile: " + o)
 
 				if not self.annoFileName:
 					self.raptor.Info("Cannot copy log from annotation file as no annotation filename was specified via the option --mo=--emake-annofile=<filename>")
@@ -599,12 +601,13 @@
 				else:
 					returncode = p.wait()
 
-					annofilename = self.annoFileName.replace("#MAKEFILE#",makefile)
+					annofilename = self.annoFileName.replace("#MAKEFILE#", makefile)
+					self.raptor.Info("copylogfromannofile: Copying log from annotation file %s to work around a potential problem with the console output", annofilename)
 					try:
 						for l in XMLEscapeLog(AnnoFileParseOutput(annofilename)):
 							self.raptor.out.write(l)
 					except Exception,e:
-						self.raptor.Error("Couldn't complete stdout output from annofile %s for %s - '%s'", annofile, command, str(e))
+						self.raptor.Error("Couldn't complete stdout output from annofile %s for %s - '%s'", annofilename, command, str(e))
 
 
 				# Take all the stderr output that went into the .stderr file
@@ -629,7 +632,7 @@
 				self.raptor.Error("Exception '%s' during '%s'", str(e), command)
 				self.Tidy()
 				# Still report end-time of the build
-				self.raptor.InfoEnd(object_type = "Building", task = "Makefile",
+				self.raptor.InfoEndTime(object_type = "Building", task = "Makefile",
 						key = str(makefile))
 				return False