# HG changeset patch # User Iain Williamson # Date 1267195279 0 # Node ID b30e816f1d398f7eb23599697c6a85d57824725f # Parent c72bd1c6fd4e1dcfaacac92dced913b40caa795b# Parent ba02dc2ff2146df9e1d924750bd4b626d4178be2 Remerge - OSTv2 in test code diff -r c72bd1c6fd4e -r b30e816f1d39 sbsv2/raptor/RELEASE-NOTES.txt --- 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 diff -r c72bd1c6fd4e -r b30e816f1d39 sbsv2/raptor/lib/config/gcce.xml --- 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 @@ - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + + + + - - + + + + + + + + + + + + + + + + + + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + diff -r c72bd1c6fd4e -r b30e816f1d39 sbsv2/raptor/lib/config/variants.xml --- 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 @@ - + - - - - - - - - - - - - - - - - - - - - - + + + + - + diff -r c72bd1c6fd4e -r b30e816f1d39 sbsv2/raptor/python/raptor.py --- 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). diff -r c72bd1c6fd4e -r b30e816f1d39 sbsv2/raptor/python/raptor_meta.py --- 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, '/')) diff -r c72bd1c6fd4e -r b30e816f1d39 sbsv2/raptor/test/smoke_suite/sysdef_layers.py --- 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 = [ + ["", 37], + ["", 7] + ] t.run() return t