fix: emake log output corruption fix by using output from the annotation file. Updates. fix
authortimothy.murphy@nokia.com
Mon, 15 Mar 2010 16:32:51 +0000
branchfix
changeset 360 77642c41e033
parent 359 6173843d1ce4
child 361 e17a12b3db40
fix: emake log output corruption fix by using output from the annotation file. Updates.
sbsv2/raptor/lib/config/make.xml
sbsv2/raptor/python/raptor_make.py
--- a/sbsv2/raptor/lib/config/make.xml	Mon Mar 15 15:52:03 2010 +0000
+++ b/sbsv2/raptor/lib/config/make.xml	Mon Mar 15 16:32:51 2010 +0000
@@ -47,6 +47,9 @@
 
 		<!-- is the text output with -j buffered or scrambled? -->
 		<set name="scrambled" value="true"/>
+
+		<!-- workaround for damaged log output from emake -->
+		<set name="copylogfromannofile" value="false"/>
 	</var>
 	
 	<alias name="make" meaning="make_engine"/>
@@ -67,6 +70,9 @@
 		<set name="build" value="$(EMAKE) HAVE_ORDERONLY= -r"/>
 		<set name="scrambled" value="false"/>
 		<set name='TALON_DESCRAMBLE' value=''/>
+
+		<!-- workaround for damaged log output from emake -->
+		<set name="copylogfromannofile" value="true"/>
 	</var>
 
 	<alias name="emake" meaning="emake_engine"/>
--- 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