Remerge - OSTv2 in test code fix
authorIain Williamson <iain.williamson@nokia.com>
Fri, 26 Feb 2010 14:41:19 +0000
branchfix
changeset 275 b30e816f1d39
parent 274 c72bd1c6fd4e (current diff)
parent 271 ba02dc2ff214 (diff)
child 276 e80c44f576df
Remerge - OSTv2 in test code
--- a/sbsv2/raptor/RELEASE-NOTES.txt	Thu Feb 25 13:00:01 2010 +0000
+++ b/sbsv2/raptor/RELEASE-NOTES.txt	Fri Feb 26 14:41:19 2010 +0000
@@ -3,6 +3,8 @@
 next version
 
 Defect Fixes:
+- SF Bug 2042 - [Raptor] component field empty in recipe
+- SF Bug 2007 - [Raptor] GCCE 4.4.1 builds require 4.3.1 and 4.3.2 SBS_GCCE???BIN env vars etc.
 - SF Bug 2000 - [Raptor] Talon fails when installed in a path containing the string '-c' (windows only)
 - SF Bug 1861 - [Raptor] More helpful console message in case of timeouts
 - SF Bug 1571 - Raptor cannot report error or warning message in wrong implib project
--- a/sbsv2/raptor/lib/config/gcce.xml	Thu Feb 25 13:00:01 2010 +0000
+++ b/sbsv2/raptor/lib/config/gcce.xml	Fri Feb 26 14:41:19 2010 +0000
@@ -5,101 +5,123 @@
 	<var name="gcce_base">
 		<set name="TOOLCHAIN" value="GCCE"/>
 		<set name="PLATMACROS.TOOLCHAIN" value="GCCE"/>
-		<set name="CC" value="$(GCCECC)"/>
-		<set name="LD" value="$(GCCELD)"/>
-		<set name="ASM" value="$(GCCEASM)"/>
-		<set name="AR" value="$(GCCEAR)"/>		
+
 		<set name="GCCECC" value="$(GCCEBIN)/arm-none-symbianelf-g++$(DOTEXE)"/>
 		<set name="GCCELD" value="$(GCCEBIN)/arm-none-symbianelf-g++$(DOTEXE)"/>
 		<set name="GCCEASM" value="$(GCCEBIN)/arm-none-symbianelf-as$(DOTEXE)"/>
 		<set name="GCCEAR" value="$(GCCEBIN)/arm-none-symbianelf-ar$(DOTEXE)"/>
 		<set name="FROMELF" value="$(GCCEBIN)/arm-none-symbianelf-readelf$(DOTEXE)"/>
+
+		<set name="CC" value="$(GCCECC)"/>
+		<set name="LD" value="$(GCCELD)"/>
+		<set name="ASM" value="$(GCCEASM)"/>
+		<set name="AR" value="$(GCCEAR)"/>
+		
 		<set name="AAPCS_OPTION" value="-mapcs -mthumb-interwork"/>
 		<set name="ARCHIVER_CREATE_OPTION" value="cr"/>
 		<set name="ARM_INSTRUCTION_SET" value="-marm"/>
+		<set name="ARMLIBS" value=""/>
 		<set name="ASM_OUTPUT_OPTION" value="-o"/>
 		<set name="ASSEMBLER_LISTING_OPTION" value="-S"/>
 		<set name="BPABI_OPTION" value=""/>
-		<set name="CC_ERRORS_CONTROL_OPTION" value=""/>
-		<set name="CC_WARNINGS_CONTROL_OPTION" value="-Wall -Wno-unknown-pragmas"/>
 		<set name="C_LANG_OPTION" value="-x c"/>
-		<set name="COMMANDFILE_OPTION" value="@"/>
-		<set name="COMPILE_ONLY_OPTION" value="-c"/>
-		<set name="CPP_LANG_OPTION" value="-x c++ -Wno-ctor-dtor-privacy"/>
-		<set name="DEBUG_OPTIMISATION" value="-O0"/>
-		<set name="DEPEND_OPTION" value="-MD -MF"/>
-		<set name="ENUM_OPTION" value=""/>
-		<set name="EXPORT_VTBL_OPTION" value=""/>
-		<set name="EXTRA_LD_OPTION" value=""/>
-		<set name="FPMODE_OPTION" value=""/>
-		<set name="LD_ERRORS_CONTROL_OPTION" value=""/>
-		<set name="LD_WARNINGS_CONTROL_OPTION" value="-Wl,--no-undefined"/>
-		<set name="LISTING_OPTION" value="-S"/>
-		<set name="EXCEPTIONS" value="-fexceptions"/>
-		<set name="NO_EXCEPTIONS" value="-fno-exceptions"/>
-		<set name="PREINCLUDE_OPTION" value="-include"/>
-		<set name="PREPROCESSOR_OPTION" value="-E"/>
-		<set name="REL_OPTIMISATION" value="-O2"/>
-		<set name="STDLIB_OPTION" value="-nodefaultlibs"/>
-		<set name="RUNTIME_SYMBOL_VISIBILITY_OPTION" value=""/>
-		<set name="RW_BASE_OPTION" value="-Wl,-Tdata,"/>
-		<set name="RW_BASE" value="$(RW_BASE_OPTION)0x400000"/>
-		<set name="CODE_SEGMENT_START" value="-Ttext"/>
-		<set name="PREINCLUDE" value="$(EPOCINCLUDE)/gcce/gcce.h"/>
+		<set name="CC.ARMV5" value="-march=armv5t"/>
+		<set name="CC.ARMV6" value="-march=armv6t2"/>
+		<set name="CC.ARMV7" value="-march=armv7"/>
 		<!-- From the GCC manual: "With this option, GCC uses features of DWARF version 3 when they are useful; ..." -->
 		<!-- There is no -gdwarf-3 option; hence CC.DWARF2 and CC.DWARF3 have the same value. -->
 		<set name="CC.DWARF2" value="-gdwarf-2"/>
 		<set name="CC.DWARF3" value="-gdwarf-2"/>
-		<set name="LD.ARMV5" value=""/>
-		<set name="LD.ARMV6" value=""/>
-		<set name="LD.ARMV7" value=""/>
+		<set name="CC.NO_UNALIGNED_ACCESS" value=""/>
+		<set name="CC.SOFTVFP_MAYBE_VFPV2" value="soft"/>
+		<set name="CC.SOFTVFP_MAYBE_VFPV3" value="soft"/>
+		<set name="CC_ERRORS_CONTROL_OPTION" value=""/>
+		<set name="CC_WARNINGS_CONTROL_OPTION" value="-Wall -Wno-unknown-pragmas"/>
 		<set name="CFLAGS" value=""/>
 		<set name="CIADEFS" value="__CIA__"/>
-		<append name="CDEFS" value='__SUPPORT_CPP_EXCEPTIONS__ _UNICODE __SYMBIAN32__ __GCCE__ __EPOC32__ __MARM__ __EABI__ __PRODUCT_INCLUDE__="$(PRODUCT_INCLUDE)" $(MMPDEFS) $(ARMMACROS)'/>
-		<!-- Note that the intention of ABLD for CIA compilation seems to be "-S -Wa,-adln", although this doesn't work -->
+		<set name="CODE_SEGMENT_START" value="-Ttext"/>
+		<set name="COMMANDFILE_OPTION" value="@"/>
+		<set name="COMPILE_ONLY_OPTION" value="-c"/>
 		<set name="COMPILER_CIA_FLAGS" value="-marm"/>
 		<set name="COMPILER_DEFINES" value="-D__GCCE__"/>		
 		<set name="COMPILER_FPU_OPTION" value="-mfloat-abi="/>		
 		<set name="COMPILER_INTERWORK_DEFINES" value="__MARM_INTERWORK__"/>
 		<set name="COMPILER_SYSTEM_INCLUDE_OPTION" value="-I"/>
 		<set name="COMPILER_THUMB_DEFINES" value="__MARM_THUMB__"/>
+		<set name="CPP_LANG_OPTION" value="-x c++ -Wno-ctor-dtor-privacy"/>
 		<set name="DATA_SEGMENT_START" value="$(SPLIT_OPTION) $(RW_BASE_OPTION)"/>
+		<set name="DEBUG_OPTIMISATION" value="-O0"/>
+		<set name="DEPEND_OPTION" value="-MD -MF"/>
+		<set name="ENUM_OPTION" value=""/>
+		<set name="EXCEPTIONS" value="-fexceptions"/>
+		<set name="EXPORT_VTBL_OPTION" value=""/>
 		<set name="EXTRA_CC_OPTION" value=""/>
+		<set name="EXTRA_LD_OPTION" value=""/>
+		<set name="FPMODE_OPTION" value=""/>
 		<set name="HEADER_FILES_CONTROL_OPTION" value=""/>
+		<set name="INSTRUCTION_SET" value=""/>
+		<set name="KERNEL_STATIC_RUNTIME_LIB" value="ksrt3_1.lib"/>
+		<set name="LD.ARMV5" value=""/>
+		<set name="LD.ARMV6" value=""/>
+		<set name="LD.ARMV7" value=""/>
+		<set name="LD_ERRORS_CONTROL_OPTION" value=""/>
+		<set name="LD_WARNINGS_CONTROL_OPTION" value="-Wl,--no-undefined"/>
 		<set name="LIBPATH" value=""/>
 		<set name="LIBRARY" value=""/>
 		<set name="LICENSERETRY_OPTION" value=""/>
 		<set name="LINKER_ADD_STATIC_RUNTIME" value="1"/>
 		<set name="LINKER_DEBUG_OPTION" value=""/>
-		<!-- Clearly the linker libs stuff following isn't right - need to use ARMLIBS (or reinvent this a bit) -->
+		<set name="LINKER_DEFAULT_LIB_PATHS" value=""/>
 		<set name="LINKER_DEFAULT_LIBS" value="-lsupc++ -lgcc"/>
-		<set name="LINKER_DEFAULT_LIB_PATHS" value=""/>
 		<set name="LINKER_ENTRY_OPTION" value="-Wl,--entry"/>
+		<set name="LINKER_GROUP_END_OPTION" value="--end-group"/>
 		<set name="LINKER_GROUP_START_OPTION" value="--start-group"/>
-		<set name="LINKER_GROUP_END_OPTION" value="--end-group"/>
 		<set name="LINKER_MISC_FLAGS" value="-Wl,$(CODE_SEGMENT_START),0x8000"/>
 		<set name="LINKER_NODEBUG_OPTION" value = "-Wl,--strip-debug"/>
 		<set name="LINKER_SCRIPT_FILE_OPTION" value="-T"/>
+		<set name="LINKER_SYMBOLS_FILE_OPTION" value="-Wl,-Map"/>
 		<set name="LINKER_SYMBOLS_OPTION" value=""/>
-		<set name="LINKER_SYMBOLS_FILE_OPTION" value="-Wl,-Map"/>
+		<set name="LISTING_OPTION" value="-S"/>
+		<set name="NEED_ENTRYPOINT_LIBRARY" value="" />
+		<set name="NEED_ENTRYPOINT_LIBRARY" value=""/>
+		<set name="NO_EXCEPTIONS" value="-fno-exceptions"/>
+		<set name="NO_UNALIGNED_ACCESS" value="$(CC.NO_UNALIGNED_ACCESS)"/>
+		<set name="OWN_LIBRARY_OPTION" value=""/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV3" value="softvfp"/>
+		<set name="PREINCLUDE" value="$(EPOCINCLUDE)/gcce/gcce.h"/>
+		<set name="PREINCLUDE_OPTION" value="-include"/>
+		<set name="PREPROCESSOR_OPTION" value="-E"/>
+		<set name="REL_OPTIMISATION" value="-O2"/>
+		<set name="RELOCATABLE_IMAGE_OPTION" value=""/>
+		<set name="RUNTIME_SYMBOL_VISIBILITY_OPTION" value=""/>
+		<set name="RVCTBIN" value="" />
+		<set name="RVCTINC" value="" />
+		<set name="RVCTLIB" value=""/>
+		<set name="RW_BASE" value="$(RW_BASE_OPTION)0x400000"/>
+		<set name="RW_BASE_OPTION" value="-Wl,-Tdata,"/>
 		<set name="SHARED_OBJECT_OPTION" value="-Wl,-shared"/>
 		<set name="SID" value=""/>
 		<set name="SO_NAME_OPTION" value="-Wl,-soname"/>
+		<set name="SPLIT_OPTION" value=""/>
+		<set name="STATIC_LIBS_LIST" value=""/>
 		<set name="STATIC_LIBS_PATH" value="" />
 		<set name="STDCPP_INCLUDE" value="$(EPOCINCLUDE)/stdapis"/>
+		<set name="STDLIB_OPTION" value="-nodefaultlibs"/>
 		<set name="SUPPORTS_ABIV1_IMPLIBS" value=""/>	
 		<set name="SYMBIAN_LD_MESSAGE_OPTION" value="$(LD_WARNINGS_CONTROL_OPTION) $(LD_ERRORS_CONTROL_OPTION)"/>
+		<set name="SYMVER_OPTION" value="-Wl,--default-symver"/>
 		<set name="TARGET_RELOCATION_OPTION" value="--target1-rel" />
-		<set name="SYMVER_OPTION" value="-Wl,--default-symver"/>
 		<set name="TEMP_FILES_OPTION" value="-pipe"/>
 		<set name="THUMB_INSTRUCTION_SET" value="-mthumb"/>
 		<set name="TRANSFORM_CIA" value=""/>		
-		<set name="INSTRUCTION_SET" value=""/>
 		<set name="UNDEFINED_SYMBOL_REF_OPTION" value="-u"/>
 		<set name="UNRESOLVED_SYMBOL_REF_OPTION" value=""/>
+		<set name="USER_LIBS_PATH_OPTION" value="--userlibpath"/>
+		<set name="USER_STATIC_RUNTIME_LIB" value="usrt3_1.lib"/>
 		<set name="USERINCLUDE" value=""/>
-		<set name="USER_LIBS_PATH_OPTION" value="--userlibpath"/>
 		<set name="VFE_OPTION" value=""/>
-		<set name="NO_UNALIGNED_ACCESS" value="$(CC.NO_UNALIGNED_ACCESS)"/>
+
+		<append name="CDEFS" value='__SUPPORT_CPP_EXCEPTIONS__ _UNICODE __SYMBIAN32__ __GCCE__ __EPOC32__ __MARM__ __EABI__ __PRODUCT_INCLUDE__="$(PRODUCT_INCLUDE)" $(MMPDEFS) $(ARMMACROS)'/>
 	</var>
 </build>
--- a/sbsv2/raptor/lib/config/variants.xml	Thu Feb 25 13:00:01 2010 +0000
+++ b/sbsv2/raptor/lib/config/variants.xml	Fri Feb 26 14:41:19 2010 +0000
@@ -77,41 +77,24 @@
 	<var name="whatlog">
 		<set name='WHATLOG' value='TRUE'/>
 	</var>
-
+	
 	<var name="gcce4_3_2" extends="gcce_base">
 		<env name="SBS_GCCE432BIN" type="path" />
 		<set name="GCCEBIN" value="$(SBS_GCCE432BIN)" />
-		<set name="OWN_LIBRARY_OPTION" value=""/>
-		<set name="STATIC_LIBS_LIST" value=""/>
 		<set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso dfprvct3_1.dso drtrvct3_1.dso"/>
-		<set name="ARMLIBS" value=""/>
-		<set name="CC.SOFTVFP_MAYBE_VFPV2" value="soft"/>
-		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
-		<set name="CC.SOFTVFP_MAYBE_VFPV3" value="soft"/>
-		<set name="PL.SOFTVFP_MAYBE_VFPV3" value="softvfp"/>
-		<set name="CC.ARMV5" value="-march=armv5t"/>
-		<set name="CC.ARMV6" value="-march=armv6t2"/>
-		<set name="CC.ARMV7" value="-march=armv7"/>
-		<set name="RELOCATABLE_IMAGE_OPTION" value=""/>
-		<set name="RVCTLIB" value=""/>
-		<set name="CC.NO_UNALIGNED_ACCESS" value=""/>
-		<set name="SPLIT_OPTION" value=""/>
-		<set name="NEED_ENTRYPOINT_LIBRARY" value=""/>
-		<set name="RVCTBIN" value="" />
-		<set name="RVCTINC" value="" />
-		<set name="USER_STATIC_RUNTIME_LIB" value="usrt3_1.lib"/>
-		<set name="KERNEL_STATIC_RUNTIME_LIB" value="ksrt3_1.lib"/>
-		<set name="NEED_ENTRYPOINT_LIBRARY" value="" />
 		<set name="PLATMACROS.VAR" value="GCCE_4 GCCE_4_3"/>
 		<set name="ARMMACROS.VAR" value="__GCCE_4__ __GCCE_4_3__"/>
 	</var>
 
-	<var name="gcce4_3_3" extends="gcce4_3_2">
+	<var name="gcce4_3_3" extends="gcce_base">
 		<env name="SBS_GCCE433BIN" type="path" />
 		<set name="GCCEBIN" value="$(SBS_GCCE433BIN)" />
+		<set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso dfprvct3_1.dso drtrvct3_1.dso"/>
+		<set name="PLATMACROS.VAR" value="GCCE_4 GCCE_4_3"/>
+		<set name="ARMMACROS.VAR" value="__GCCE_4__ __GCCE_4_3__"/>
 	</var>
 	
-	<var name="gcce4_4_1" extends="gcce4_3_3">
+	<var name="gcce4_4_1" extends="gcce_base">
 		<env name="SBS_GCCE441BIN" type="path" />
 		<set name="GCCEBIN" value="$(SBS_GCCE441BIN)" />
 		<set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso"/>
--- a/sbsv2/raptor/python/raptor.py	Thu Feb 25 13:00:01 2010 +0000
+++ b/sbsv2/raptor/python/raptor.py	Fri Feb 26 14:41:19 2010 +0000
@@ -238,7 +238,7 @@
 class Component(ModelNode):
 	"""A group of projects or, in symbian-speak, a bld.inf.
 	"""
-	def __init__(self, filename):
+	def __init__(self, filename, layername="", componentname=""):
 		super(Component,self).__init__(filename)
 		# Assume that components are specified in bld.inf files for now
 		# One day that tyranny might end.
@@ -249,21 +249,34 @@
 		self.exportspecs = []
 		self.depfiles = []
 		self.unfurled = False # We can parse this
+		
+		# Extra metadata optionally supplied with system definition file gathered components
+		self.layername = layername
+		self.componentname = componentname
 
 	def AddMMP(self, filename):
 		self.children.add(Project(filename))
 
 
 class Layer(ModelNode):
-	""" 	Some components that should be built togther
+	""" Some components that should be built togther
 		e.g. a Layer in the system definition.
+		
+		Components that come from system definition files can
+		have extra surrounding metadata that we need to pass
+		on for use in log output.
 	"""
 	def __init__(self, name, componentlist=[]):
 		super(Layer,self).__init__(name)
 		self.name = name
 
 		for c in componentlist:
-			self.children.add(Component(c))
+			if isinstance(c, raptor_xml.SystemModelComponent):
+				# this component came from a system_definition.xml
+				self.children.add(Component(c, c.GetContainerName("layer"), c.GetContainerName("component")))
+			else:
+				# this is a plain old bld.inf file from the command-line
+				self.children.add(Component(c))
 
 	def unfurl(self, build):
 		"""Discover the children of this layer. This involves parsing the component MetaData (bld.infs, mmps).
--- a/sbsv2/raptor/python/raptor_meta.py	Thu Feb 25 13:00:01 2010 +0000
+++ b/sbsv2/raptor/python/raptor_meta.py	Fri Feb 26 14:41:19 2010 +0000
@@ -2686,15 +2686,6 @@
 
 		specName = getSpecName(component.bldinf_filename, fullPath=True)
 
-		if isinstance(component.bldinf, raptor_xml.SystemModelComponent):
-			# this component came from a system_definition.xml
-			layer = component.bldinf.GetContainerName("layer")
-			componentName = component.bldinf.GetContainerName("component")
-		else:
-			# this is a plain old bld.inf file from the command-line
-			layer = ""
-			componentName = ""
-
 		# exports are independent of build platform
 		for i,ep in enumerate(self.ExportPlatforms):
 			specNode = raptor_data.Specification(name = specName)
@@ -2705,8 +2696,8 @@
 			# add some basic data in a component-wide variant
 			var = raptor_data.Variant(name='component-wide')
 			var.AddOperation(raptor_data.Set("COMPONENT_META", str(component.bldinf_filename)))
-			var.AddOperation(raptor_data.Set("COMPONENT_NAME", componentName))
-			var.AddOperation(raptor_data.Set("COMPONENT_LAYER", layer))
+			var.AddOperation(raptor_data.Set("COMPONENT_NAME", component.componentname))
+			var.AddOperation(raptor_data.Set("COMPONENT_LAYER", component.layername))
 			specNode.AddVariant(var)
 
 			# add this bld.inf Specification to the export platform
@@ -2737,8 +2728,8 @@
 				# add some basic data in a component-wide variant
 				var = raptor_data.Variant(name='component-wide-settings-' + plat)
 				var.AddOperation(raptor_data.Set("COMPONENT_META",str(component.bldinf_filename)))
-				var.AddOperation(raptor_data.Set("COMPONENT_NAME", componentName))
-				var.AddOperation(raptor_data.Set("COMPONENT_LAYER", layer))
+				var.AddOperation(raptor_data.Set("COMPONENT_NAME", component.componentname))
+				var.AddOperation(raptor_data.Set("COMPONENT_LAYER", component.layername))
 				var.AddOperation(raptor_data.Set("MODULE", modulename))
 				var.AddOperation(raptor_data.Append("OUTPUTPATHOFFSET", outputDir, '/'))
 				var.AddOperation(raptor_data.Append("OUTPUTPATH", outputDir, '/'))
--- a/sbsv2/raptor/test/smoke_suite/sysdef_layers.py	Thu Feb 25 13:00:01 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/sysdef_layers.py	Fri Feb 26 14:41:19 2010 +0000
@@ -20,11 +20,10 @@
 	t = SmokeTest()
 	t.id = "48"
 	t.name = "sysdef_layers"
-	t.description = "Test system_definition.xml layer processing"
-	t.command = 'sbs -s ' + \
-			'smoke_suite/test_resources/sysdef/system_definition_order_layer_test.xml' + \
-			' -l "Metadata Export" -l "Build Generated Source" -l ' + \
-			'"Component with Layer Dependencies" -o'
+	t.usebash = True
+	t.description = "Test system_definition.xml layer processing and log reporting"
+	t.command = 'sbs -f- -s smoke_suite/test_resources/sysdef/system_definition_order_layer_test.xml ' + \
+			'-l "Metadata Export" -l "Build Generated Source" -l "Component with Layer Dependencies" -o'
 	t.targets = [
 		"$(SBS_HOME)/test/smoke_suite/test_resources/sysdef/build_gen_source/exported.inf",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/sysdef/build_gen_source/exported.mmh",
@@ -82,5 +81,9 @@
 		"helloworld_exe/winscw/urel/helloworld_UID_.o",
 		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp"
 		])
+	t.countmatch = [
+		["<recipe .*layer='Component with Layer Dependencies' component='dependent'.*>", 37],
+		["<recipe .*layer='Build Generated Source' component='build generated source'.*>", 7]		
+		]
 	t.run()
 	return t