merge and switch off static bc check
authorBrendan Donegan brendand@symbian.org
Thu, 01 Oct 2009 13:22:04 +0100
changeset 553 f0c8c9e2cbbd
parent 552 8018a074606b (current diff)
parent 551 cd084e6d144e (diff)
child 554 e7177e3534dc
merge and switch off static bc check
common/common_props.ant.xml
--- a/common/build.postbuild.xml	Thu Oct 01 13:19:42 2009 +0100
+++ b/common/build.postbuild.xml	Thu Oct 01 13:22:04 2009 +0100
@@ -304,8 +304,8 @@
           </fileset>
         </path>
         <sequential>
-		  <propertyregex override="yes" property="preprocessedlogfile" input="@{logfile}" regexp=".*[\\/](.*)_compile\.log" replace="\1_compile_preprocessed.log"/>
-	      <echo message="Preprocessing @{logfile}..."/>
+          <propertyregex override="yes" property="preprocessedlogfile" input="@{logfile}" regexp=".*[\\/](.*)_compile\.log" replace="\1_compile_preprocessed.log"/>
+          <echo message="Preprocessing @{logfile}..."/>
           <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" input="@{logfile}" output="${build.log.dir}/analysis/${preprocessedlogfile}" error="${build.log.dir}/analysis/${build.id}_preprocess.log" append="true">
             <arg value="${sf.common.config.dir}/tools/raptor/preprocess_log.pl"/>
           </exec>
@@ -321,7 +321,6 @@
         </path>
         <sequential>
           <echo message="Extracting whatlog info from @{whatlogfile}..."/>
-          <echo message="Exec: [${sf.common.config.dir}/tools/raptor] perl ${sf.common.config.dir}/tools/raptor/parse.pl --releaseable --log=@{whatlogfile} --basedir=${build.log.dir} --append"/>
           <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_whatlog.log" append="true">
             <arg value="${sf.common.config.dir}/tools/raptor/parse.pl"/>
             <arg value="--releaseable"/>
@@ -342,7 +341,6 @@
         <sequential>
           <echo message="Extracting error info from @{raptorlogfile}..."/>
           <propertyregex override="yes" property="raptorconfig" input="@{raptorlogfile}" regexp=".*[\\/].*__(.*)\.whatlog_(single|multiple)_thread.*" replace="\1" casesensitive="false" defaultValue="noconfig"/>
-          <echo message="Exec: [${sf.common.config.dir}/tools/raptor] perl ${sf.common.config.dir}/tools/raptor/parse.pl --error --warning --unreciped --recipe --config=${raptorconfig} --log=@{raptorlogfile} --basedir=${build.log.dir}/raptorbits --append"/>
           <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_raptorparse.log" append="true">
             <arg value="${sf.common.config.dir}/tools/raptor/parse.pl"/>
             <arg value="--error"/>
@@ -352,12 +350,11 @@
             <arg value="--config=${raptorconfig}"/>
             <arg value="--log=@{raptorlogfile}"/>
             <arg value="--basedir=${build.log.dir}/raptorbits"/>
-            <arg value="--append"/>
           </exec>
         </sequential>
       </for>
       
-      <echo message="Exec: [${sf.common.config.dir}/tools/raptor] perl ${sf.common.config.dir}/tools/raptor/summarize.pl --raptorbitsdir=${build.log.dir}/raptorbits --outputdir=${build.log.dir}"/>
+      <echo message="Summarizing Raptor data"/>
       <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_raptorparse.log" append="true">
         <arg value="${sf.common.config.dir}/tools/raptor/summarize.pl"/>
         <arg value="--raptorbitsdir=${build.log.dir}/raptorbits"/>
@@ -377,6 +374,15 @@
           </exec>
         </sequential>
       </for>
+
+      <!-- Cook the raptor analysis further to produce something in the right format for the BRAG system -->
+      <exec executable="perl" output="${build.log.dir}/summary/Raptor_BRAG.xml" logError="yes">
+        <arg value="${sf.common.config.dir}/tools/brag/raptorToBRAG.pl"/>
+        <arg value="--raptorsummary"/>
+        <arg value="${build.log.dir}/raptorbits/summary.csv"/>
+      </exec>
+      <!-- And copy the XSL so the output can be transformed by a browser -->
+      <copy file="${sf.common.config.dir}/tools/brag/brag.xsl" toDir="${build.log.dir}/summary/"/>
     </target>
 
     <target name="sf-run-analysis-yarp">          
--- a/common/build.test.xml	Thu Oct 01 13:19:42 2009 +0100
+++ b/common/build.test.xml	Thu Oct 01 13:22:04 2009 +0100
@@ -115,7 +115,7 @@
                             <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_dynamicbc.log">
                               <arg value="ats_specialise_test_drop.pl"/>
                               <arg value="--test-drop-name=${env.COMPUTERNAME}-bctest-${build.id}_${program}"/> 
-                              <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
+                              <arg value="--host-name=${env.COMPUTERNAME}.ad-sfpd.intra"/>
                               <arg value="--src=${sf.spec.test.package.location}/../bctest/${program}"/>
                               <arg value="--dest=${sf.spec.test.package.location}\${env.COMPUTERNAME}-bctest-${build.id}_${program}" />						 
                             </exec>
@@ -165,7 +165,7 @@
         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
             <arg value="ats_specialise_test_drop.pl"/>
             <arg value="--test-drop-name=Smoketest-${build.id}"/> 
-            <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
+            <arg value="--device-name=${env.COMPUTERNAME}.ad-sfpd.intra"/>
             <arg value="--src=${sf.spec.test.package.location}\smoketest.zip"/>
             <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>	
             <arg value="--build-id=http://${sf.spec.publish.diamonds.server}${diamonds.build.id}"/>			
--- a/common/common_props.ant.xml	Thu Oct 01 13:19:42 2009 +0100
+++ b/common/common_props.ant.xml	Thu Oct 01 13:22:04 2009 +0100
@@ -97,8 +97,8 @@
 
     <!-- BC check properties -->
     <property name="sf.spec.bccheck.enable" value="false"/> <!-- This disables it being called during a normal build, although the target can be called seperately -->
-    <property name="sf.spec.bccheck.enable.la" value="true"/>
-    <property name="sf.spec.bccheck.enable.ha" value="true"/>
+    <property name="sf.spec.bccheck.enable.la" value="false"/>
+    <property name="sf.spec.bccheck.enable.ha" value="false"/>
     <property name="sf.spec.bccheck.enable.dynamic" value="true"/>
     <property name="sf.spec.bccheck.baseline.name" value="symbian1"/>
     <property name="sf.spec.bccheck.baseline.skd.dir" value="\\v800008\builds01\releases\installed\s60_5th_sdk_installed"/>
--- a/common/tools/ats/ats_specialise_test_drop.pl	Thu Oct 01 13:19:42 2009 +0100
+++ b/common/tools/ats/ats_specialise_test_drop.pl	Thu Oct 01 13:22:04 2009 +0100
@@ -11,6 +11,7 @@
 #   Mike Kinghan, mikek@symbian.org
 #
 # Contributors:
+#	Brendan Donegan, brendand@symbian.org
 #
 # Description:
 #   This is a tool for setting the name of an ATS test drop, and/or the build id
@@ -24,13 +25,13 @@
 use Data::Dumper;
 
 my $test_drop_name;	# Test drop name to be embedded in output XML
-my $build_id;    # Build ID to be embedded in output XML 
-my $device_name; # Device name to be embedded in output XML
+my $build_id;   # Build ID to be embedded in output XML 
+my $host_name;  # Host name to be embedded in output XML
 my $srcfile;	# Input test drop file, either .xml or .zip
 my $destfile;	# Leafname for output file. Extension will be .xml or .zip as input.
 				# If unspecified then the input file is updated. 
 my $help;		# Do help?
-my $srctype;	# Type of inpout file, .xml or .zip
+my $srctype;	# Type of input file, .xml or .zip
 my $dev_null = $^O =~ /^MSWin/ ? "nul" : "/dev/null";	# OS-dependent nul device.
 my $zipper;		# Zip command, depending on whether zip or 7z is available.
 my $unzipper;	# Unzip command, depending on whether [unzip or 7z is available.
@@ -43,7 +44,7 @@
 sub silent_command($);
 
 my %optmap = (  'test-drop-name' => \$test_drop_name,
-			    'device-name' => \$device_name,
+			    'host-name' => \$host_name,
 			    'build-id' => \$build_id,
 			    'src' => \$srcfile,
 			    'dest' => \$destfile,
@@ -51,7 +52,7 @@
 
 GetOptions(\%optmap,
           'test-drop-name=s',
-          'device-name=s',
+          'host-name=s',
           'build-id=s',
           'src=s',
           'dest=s',
@@ -123,11 +124,11 @@
 # Insert the specified build id, if any.
 $test_drop->{'test'}->{'buildid'}->[0] = $build_id, if $build_id;
 
-if ($device_name) { # Also insert sepcified device name.
+if ($host_name) { # Also insert specified host name
 	
 	my $device_properties = $test_drop->{'test'}->{'target'}->[0]->{'device'}->[0]->{'property'};
 	my $num_properties = @{$device_properties};
-	$device_properties->[$num_properties]= { 'name' => "NAME", 'value' => "$device_name" };
+	$device_properties->[$num_properties]= { 'name' => "HOST", 'value' => "$host_name" };
 	$test_drop->{'test'}->{'target'}->[0]->{'device'}->[0]->{'property'} = $device_properties;
     #print Dumper($device_properties);
     #exit(0);		
@@ -169,12 +170,12 @@
             "Specify the name, build id and target device in an ATS XML test drop\n" .
             "synopsis:\n" .
             "  ats_specialise_test_drop.pl --help\n" .
-            "  ats_specialise_test_drop.pl [--test-drop-name=TESTNAME] [--build-id=BUILDID] [--device-name=DEVICENAME] [--dest=FILE] --src=FILE \n" .
+            "  ats_specialise_test_drop.pl [--test-drop-name=TESTNAME] [--build-id=BUILDID] [--host-name=HOSTNAME] [--dest=FILE] --src=FILE \n" .
             "options:\n" .
             "  --help                        Display this help and exit\n" .
             "  --test-drop-name=TESTNAME     TESTNAME is the desired name of the test drop. If not specified then the test drop name is not modified.\n" .
             "  --build-id=BUILDID            BUILDID is id of the build being tested. If not specified then the build id is not modified.\n" .            
-            "  --device-name=DEVICENAME      DEVICENAME  is the name of the device on which the test should be run. " .
+            "  --device-name=HOSTNAME        HOSTNAME  is the name of the ATS worker on which the test should be run. " .
             "If not specified then the test device name is not modified.\n" .
             "  --src=INFILE                  INFILE is the file containing the test drop XML to be modified, or else a zip file " .
             "                                containing the test drop XML in the file 'test.xml'. INFILE must have extension .xml or.zip\n" .
--- a/common/tools/ats/bctest/package_definition.xml	Thu Oct 01 13:19:42 2009 +0100
+++ b/common/tools/ats/bctest/package_definition.xml	Thu Oct 01 13:22:04 2009 +0100
@@ -1,169 +1,350 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE SystemDefinition [
+<!ENTITY codeline_oss_fcl	"//v800008/builds01/mercurial_development/oss/FCL" >
+<!ENTITY codeline_sfl_fcl	"//v800008/builds01/mercurial_development/sfl/FCL" >
+<!ENTITY codeline_sfl_mcl	"//v800008/builds01/Mercurial_master_prod/sfl/MCL" >
+<!ENTITY cmd_clone			"hg clone" >
+<!ENTITY cmd_cwdir			"python metacmd.py cwdir" >
+<!ENTITY cmd_makedirs		"python metacmd.py makedirs" >
+<!ENTITY cmd_perl			"perl" >
+<!ENTITY cmd_sisbld			"makesis" >
+<!ENTITY cmd_unzip			"7z -y x" >
+<!ENTITY cmd_update			"hg update" >
+<!ENTITY cmd_wget			"wget" >
+
+<!ELEMENT SystemDefinition ( systemModel | layer | package | collection | component)>
+<!ATTLIST SystemDefinition
+  schema CDATA #REQUIRED
+>
+<!-- this DTD describes schema="3.0.0" -->
+
+<!-- all relative paths are relative to this file
+	all absolute paths are relative to the environment variable specified by the root attribute, or SRCROOT if not.  -->
+
+<!-- Container for metadata
+	meta, if present, should always be the first element in the parent
+	 -->
+<!ELEMENT meta ANY>
+<!ATTLIST meta
+  href		CDATA #IMPLIED
+  type	CDATA "auto"
+  rel	CDATA "Generic"
+>
+
+<!-- systemModel element has name but no ID -->
+<!ELEMENT systemModel (meta*, layer+)>
+<!ATTLIST systemModel
+  name CDATA #IMPLIED
+>
+
+<!-- All items from layer down to component should have either @href or at least one valid child item.
+	Anything else will be considered a placeholder
+	-->
+
+<!ELEMENT layer (meta*, (package | collection)*)  >
+<!ATTLIST layer
+  id ID #REQUIRED
+  name CDATA #IMPLIED
+  href		CDATA #IMPLIED
+  levels NMTOKENS #IMPLIED
+  span CDATA #IMPLIED
+  before NMTOKEN #IMPLIED
+>
+
+<!ELEMENT package (meta*,  (package | collection)*)>
+ <!-- Nested packages are for backwards compatibility only -->
+<!ATTLIST package
+  id ID #REQUIRED
+  name CDATA #IMPLIED
+  version CDATA #IMPLIED
+  href	 CDATA #IMPLIED
+  levels NMTOKENS #IMPLIED
+  span CDATA #IMPLIED
+  level NMTOKEN #IMPLIED
+  before NMTOKEN #IMPLIED
+>
+
+<!ELEMENT collection (meta*, (component* ))>
+<!ATTLIST collection
+  id ID #REQUIRED
+  name CDATA #IMPLIED
+  href		CDATA #IMPLIED
+  level NMTOKEN #IMPLIED
+  before NMTOKEN #IMPLIED
+>
+
+<!ELEMENT component (meta*, unit*)>
+<!-- contains units or is a placeholder -->
+<!ATTLIST component
+  id ID #REQUIRED
+  name CDATA #IMPLIED
+  href		CDATA #IMPLIED
+  deprecated CDATA #IMPLIED
+  introduced CDATA #IMPLIED
+  target  ( device | desktop | other ) "device"
+  purpose ( optional | mandatory | development ) "optional"
+  class NMTOKENS #IMPLIED
+  filter CDATA #IMPLIED
+  before NMTOKEN #IMPLIED
+  origin-model CDATA #IMPLIED
+>
+<!--
+	"filter" attribute is deprecated
+	"origin-model" attribute is only to be inserted by tools when merging models
+ 	recommended class values are:
+		doc, config, plugin, tool, api -->
+
+<!ELEMENT unit EMPTY >
+<!ATTLIST unit
+  mrp CDATA #IMPLIED
+  bldFile CDATA #IMPLIED
+  base CDATA #IMPLIED
+  root CDATA #IMPLIED
+  version NMTOKEN #IMPLIED
+  prebuilt NMTOKEN #IMPLIED
+  late (yes|no) #IMPLIED
+  filter CDATA #IMPLIED
+  priority CDATA #IMPLIED
+>
+<!-- filter and priority are deprecated
+	"root" attribute will usually be inserted by tools when merging models, although it can be set manually-->
+]>
 <SystemDefinition name="Foundation" schema="2.0.1">
 	<systemModel>
-		<layer name="bc" long-name="Binary Compatability" levels="generic specific">
-			<block long-name="Dynamic BC Tests" level="specific" name="dynamicbctest" levels="fts">
-				<collection name="aspconnectionsis" long-name="50_asp_connection.sis">
-					<component id="aspconnection" name="ASP Connection Test">
-					  <unit bldFile="sf/mw/websrv/websrv_pub/web_service_connection_api/tsrc/bc/connection/group"/>
-					</component>
-				</collection>
-				<collection name="hostconnsis" long-name="50_asp_hostconn.sis">
-				  <component id="hostconn" name="Hostlet Connection Test">
+		<layer name="pre-bld" long-name="Binary Compatability Sync" levels="generic specific">
+			<meta type="commands">
+				<command cmd="&cmd_makedirs;	interim/fbf/configs" />
+				<command cmd="&cmd_makedirs;	sf/app" />
+				<command cmd="&cmd_makedirs;	sf/mw" />
+				<command cmd="&cmd_makedirs;	sf/os" />
+				<command cmd="&cmd_makedirs;	sftools/ana" />
+				<command cmd="&cmd_clone;		&codeline_oss_fcl;/interim/fbf/configs/default	interim/fbf/configs/default" />
+				<command cmd="&cmd_clone;		&codeline_sfl_fcl;/sf/app/contacts				sf/app/contacts" />
+				<command cmd="&cmd_clone;		&codeline_sfl_fcl;/sf/app/messaging				sf/app/messaging" />
+				<command cmd="&cmd_clone;		&codeline_sfl_fcl;/sf/mw/appsupport				sf/mw/appsupport" />
+				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/mw/drm					sf/mw/drm" />
+				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/mw/locationsrv			sf/mw/locationsrv" />
+				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/mw/messagingmw			sf/mw/messagingmw" />
+				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/mw/mmmw					sf/mw/mmmw" />
+				<command cmd="&cmd_clone;		&codeline_sfl_fcl;/sf/mw/websrv					sf/mw/websrv" />
+				<command cmd="&cmd_clone;		&codeline_sfl_fcl;/sf/os/devicesrv				sf/os/devicesrv" />
+				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/os/graphics				sf/os/graphics" />
+				<command cmd="&cmd_update;		-r 9" dir="sf/os/graphics" />
+				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/os/kernelhwsrv			sf/os/kernelhwsrv" />
+				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/os/mm						sf/os/mm" />
+				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/os/ossrv					sf/os/ossrv" />
+				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/os/shortlinksrv			sf/os/shortlinksrv" />
+				<command cmd="&cmd_clone;		&codeline_sfl_fcl;/sftools/ana/compatanamdw		sftools/ana/compatanamdw" />
+				<command cmd="&cmd_wget;		http://developer.symbian.org/wiki/images/e/e7/Xvid.zip" />
+				<command cmd="&cmd_unzip;		xvid.zip" />
+				<command cmd="&cmd_perl;		sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/group/SetEnv.pl" />
+			</meta>
+		</layer>
+		<layer name="bld_production" long-name="Binary Compatability Production code build" levels="generic specific">
+			<collection name="aspconnectionsis" long-name="50_asp_connection.sis">
+				<component id="aspconnection" name="ASP Connection Test">
+					<unit bldFile="sf/mw/websrv/websrv_pub/web_service_connection_api/tsrc/bc/connection/group"/>
+				</component>
+			</collection>
+			<collection name="hostconnsis" long-name="50_asp_hostconn.sis">
+				<component id="hostconn" name="Hostlet Connection Test">
 					<unit bldFile="sf/mw/websrv/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/group"/>
-				  </component>
-				</collection>
-				<collection name="newsoapclassessis" long-name="50_asp_newsoapclasses.sis">
-				  <component id="newsoapclasses" name="New SOAP Classes Test">
+				</component>
+			</collection>
+			<collection name="newsoapclassessis" long-name="50_asp_newsoapclasses.sis">
+				<component id="newsoapclasses" name="New SOAP Classes Test">
 					<unit bldFile="sf/mw/websrv/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/group"/>
-				  </component>
-				</collection>
-				<collection name="favouritesbctestsis" long-name="50_Browser_Favourites.SIS">
-				  <component id="favouritesbctest" name="Browser Favourites BC Test">
-				    <unit bldFile="sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/browser/apps/FavouritesBCTest/group"/>
-				  </component>
-				</collection>
-				<collection name="downloadmgrbctestsis" long-name="50_Browser_DownloadMgr.SIS">
-				  <component id="downloadmgrbctest" name="Download Manager BC Test">
-					<unit bldFile="sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/browser/apps/DownloadMgrBCTest/group"/>
-				  </component>	
-				</collection>
-				
-				<component id="lmksearch" name="Landmark Search Test">
-				  <unit bldFile="sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/location/apps/LandmarksEngine/landmarks_search_api/group"/>
 				</component>
-				<component id="lmkdbmgmt" name="Landmark Database Management Test">
-				  <unit bldFile="sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/location/apps/LandmarksEngine/landmarks_database_management_api/group"/>
-				</component>
-				<component id="landmarks" name="Landmarks API Test">
-				  <unit bldFile="sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/location/apps/LandmarksEngine/landmarks_api/group"/>
+			</collection>
+			<collection name="favouritesbctestsis" long-name="50_Browser_Favourites.SIS">
+				<component id="favouritesbctest" name="Browser Favourites BC Test">
+					<unit bldFile="sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/browser/apps/FavouritesBCTest/group"/>
 				</component>
-				
-				<collection name="mmsclientmtmsis" long-name="50_Messaging_MMSClientMTM.SIS">
-				  <component id="mmsclientmtm" name="Messaging MMS Client MTM BC Test">
-				    <unit bldFile="sf/app/messaging/msg_pub/mms_client_mtm_api/tsrc/bc/group"/>
-				  </component>
-				</collection>
+			</collection>
+			<collection name="downloadmgrbctestsis" long-name="50_Browser_DownloadMgr.SIS">
+				<component id="downloadmgrbctest" name="Download Manager BC Test">
+					<unit bldFile="sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/browser/apps/DownloadMgrBCTest/group"/>
+				</component>	
+			</collection>
 
-				<collection name="senduiapisis" long-name="50_msg_sendui.sis">
-				  <component id="sendui" name="Messaging Send UI API BC Test">
-				    <unit bldFile="sf/mw/messagingmw/msgfw_pub/send_ui_api/tsrc/bc/group"/>
-				  </component>
-				</collection>
-				
-				<collection name="pluginbiosis" long-name="50_Messaging_PluginBio.sis">
-				  <component id="pluginbio" name="Messaging Plugin BIO BC Test">
-				    <unit bldFile="sf/app/messaging/msg_pub/plugin_bio_control_api/tsrc/bc/group"/>
-				  </component>
-				</collection>
-				
-				<component id="drmcaf" name="DRM CAF BC Test">
-				  <unit bldFile="sf/mw/drm/drm_pub/oma_drm_caf_agent_api/tsrc/bc/group"/>
+					<component id="lmksearch" name="Landmark Search Test">
+						<unit bldFile="sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/location/apps/LandmarksEngine/landmarks_search_api/group"/>
+					</component>
+					<component id="lmkdbmgmt" name="Landmark Database Management Test">
+						<unit bldFile="sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/location/apps/LandmarksEngine/landmarks_database_management_api/group"/>
+					</component>
+					<component id="landmarks" name="Landmarks API Test">
+						<unit bldFile="sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/location/apps/LandmarksEngine/landmarks_api/group"/>
+					</component>
+
+			<collection name="mmsclientmtmsis" long-name="50_Messaging_MMSClientMTM.SIS">
+				<component id="mmsclientmtm" name="Messaging MMS Client MTM BC Test">
+					<unit bldFile="sf/app/messaging/msg_pub/mms_client_mtm_api/tsrc/bc/group"/>
+				</component>
+			</collection>
+
+			<collection name="senduiapisis" long-name="50_msg_sendui.sis">
+				<component id="sendui" name="Messaging Send UI API BC Test">
+					<unit bldFile="sf/mw/messagingmw/msgfw_pub/send_ui_api/tsrc/bc/group"/>
 				</component>
-				
-				<collection name="pbkdataaddeditsis" long-name="50_PIM_PbkDataAddEdit.SIS">
-				  <component id="pbkdataaddedit" name="Phonebook Data Add Edit BC Test">
-				    <unit bldFile="sf/app/contacts/contacts_pub/phonebook_data_addedit_ui_api/tsrc/bc/group"/>
-				  </component>
-				</collection>
-				
-				<collection name="pbkdatamanagementsis" long-name="50_PIM_PbkDataMgmt.SIS">
-				  <component id="pbkdatamgmt" name="Phonebook Data Management BC Test">
-				    <unit bldFile="sf/app/contacts/contacts_pub/phonebook_data_management_api/tsrc/bc/group"/>
-				  </component>
-				</collection>
-				
-				<collection name="pbkfetchuisis" long-name="50_PIM_PbkFetchAPI.SIS">
-				  <component id="pbkfetchui" name="Phonebook Fetch UI BC Test">
-				    <unit bldFile="sf/app/contacts/contacts_pub/phonebook_fetch_ui_api/tsrc/bc/group"/>
-				  </component>
-				</collection>
-				
-				<component id="pbkuiutil" name="Phonebook UI Utils BC Test">
-				  <unit bldFile="sf/app/contacts/contacts_pub/phonebook_ui_utilities_api/tsrc/bc/group"/>
+			</collection>
+
+			<collection name="pluginbiosis" long-name="50_Messaging_PluginBio.sis">
+				<component id="pluginbio" name="Messaging Plugin BIO BC Test">
+					<unit bldFile="sf/app/messaging/msg_pub/plugin_bio_control_api/tsrc/bc/group"/>
+				</component>
+			</collection>
+
+					<component id="drmcaf" name="DRM CAF BC Test">
+						<unit bldFile="sf/mw/drm/drm_pub/oma_drm_caf_agent_api/tsrc/bc/group"/>
+					</component>
+
+			<collection name="pbkdataaddeditsis" long-name="50_PIM_PbkDataAddEdit.SIS">
+				<component id="pbkdataaddedit" name="Phonebook Data Add Edit BC Test">
+					<unit bldFile="sf/app/contacts/contacts_pub/phonebook_data_addedit_ui_api/tsrc/bc/group"/>
+				</component>
+			</collection>
+
+			<collection name="pbkdatamanagementsis" long-name="50_PIM_PbkDataMgmt.SIS">
+				<component id="pbkdatamgmt" name="Phonebook Data Management BC Test">
+					<unit bldFile="sf/app/contacts/contacts_pub/phonebook_data_management_api/tsrc/bc/group"/>
+				</component>
+			</collection>
+
+			<collection name="pbkfetchuisis" long-name="50_PIM_PbkFetchAPI.SIS">
+				<component id="pbkfetchui" name="Phonebook Fetch UI BC Test">
+					<unit bldFile="sf/app/contacts/contacts_pub/phonebook_fetch_ui_api/tsrc/bc/group"/>
 				</component>
-				<component id="pbkvcard" name="Phonebook vCard Import Export BC Test">
-				  <unit bldFile="sf/app/contacts/contacts_pub/phonebook_vcard_importexport_api/tsrc/bc/group"/>
-				</component>
-				<component id="pbkspeeddial" name="Phonebook Speed Dial BC Test">
-				  <unit bldFile="sf/app/contacts/contacts_pub/speed_dial_utility_control_api/tsrc/bc/group"/>
-				</component>
-				<component id="proengwrap" name="Profiles Engine Wrapper Test">
-				  <unit bldFile="sf/mw/appsupport/appsupport_pub/profiles_engine_wrapper_api/tsrc/BC/ProfilesEngineWrapperAPI/group"/>
-				</component>
-				
-				<component id="basesvs" name="SVS Base API Tests" class="test">
-				  <unit bldFile="sf/os/kernelhwsrv/baseapitest/basesvs/group"/>
-				</component>
-				
-				<component id="graphicssvs" name="SVS Graphics API Tests" class="test">
-				  <unit bldFile="sf/os/graphics/graphicsapitest/graphicssvs/group"/>
+			</collection>
+
+					<component id="pbkuiutil" name="Phonebook UI Utils BC Test">
+						<unit bldFile="sf/app/contacts/contacts_pub/phonebook_ui_utilities_api/tsrc/bc/group"/>
+					</component>
+					<component id="pbkvcard" name="Phonebook vCard Import Export BC Test">
+						<unit bldFile="sf/app/contacts/contacts_pub/phonebook_vcard_importexport_api/tsrc/bc/group"/>
+					</component>
+					<component id="pbkspeeddial" name="Phonebook Speed Dial BC Test">
+						<unit bldFile="sf/app/contacts/contacts_pub/speed_dial_utility_control_api/tsrc/bc/group"/>
+					</component>
+					<component id="proengwrap" name="Profiles Engine Wrapper Test">
+						<unit bldFile="sf/mw/appsupport/appsupport_pub/profiles_engine_wrapper_api/tsrc/BC/ProfilesEngineWrapperAPI/group"/>
+					</component>
+
+			<collection name="multimediasvs" long-name="SVS Multimedia API Tests">
+				<component id="testfwsrv" name="Multimedia Test Framework Server">
+					<unit bldFile="sf/os/mm/mmtestenv/mmtestfw/group"/>
 				</component>
-				
-				<!-- OS Services SVS -->
-				<collection name="systemlibrariessvs" long-name="SVS System Libraries API Tests">
-				  <component id="syslibssvs" name="SysLibs SVS Suite" class="test">
-				    <unit bldFile="sf/os/ossrv/syslibsapitest/syslibssvs/group"/>
-				  </component>
-				</collection>
-				  
-				<collection name="multimediasvs" long-name="SVS Multimedia API Tests">
-				  <component id="mmsvs" name="Multimedia SVS Suite" class="test">
-					<unit bldFile="sf/os/mm/mmapitest/mmsvs/suite/group"/>
-				  </component>
-				  <component id="testfwsrv" name="Multimedia Test Framework Server">
-					<unit bldFile="sf/os/mm/mmtestenv/mmtestfw/group"/>
-				  </component>
-				</collection>
-				
-				<collection name="systemswsis" long-name="50_systemsw.sis">
-				  <component id="systemsw" name="System Software">
+			</collection>
+
+			<collection name="systemswsis" long-name="50_systemsw.sis">
+				<component id="systemsw" name="System Software">
 					<unit bldFile="sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/systemsw/group"/>
-				  </component>
-				  <component id="featurediscovery" name="Feature Discovery API">
+				</component>
+				<component id="featurediscovery" name="Feature Discovery API">
 					<unit bldFile="sf/os/devicesrv/devicesrv_pub/feature_discovery_api/tsrc/bc/featurediscovery/group"/>
-				  </component>
-				  <component id="finditem" name="Find Item API">
+				</component>
+				<component id="finditem" name="Find Item API">
 					<unit bldFile="sf/os/devicesrv/devicesrv_pub/find_item_api/tsrc/bc/finditem/group"/>
-				  </component>
-				  <component id="light" name="Light API">
+				</component>
+				<component id="light" name="Light API">
 					<unit bldFile="sf/os/devicesrv/devicesrv_pub/light_api/tsrc/bc/light/group"/>
-				  </component>
-				  <component id="phoneparser" name="Phone Parser API">
+				</component>
+				<component id="phoneparser" name="Phone Parser API">
 					<unit bldFile="sf/os/devicesrv/devicesrv_pub/phone_parser_api/tsrc/bc/phoneparser/group"/>
-				  </component>
-				  <component id="platformenv" name="Platform Environment API">
+				</component>
+				<component id="platformenv" name="Platform Environment API">
 					<unit bldFile="sf/os/devicesrv/devicesrv_pub/platform_environment_api/tsrc/bc/platformenv/group"/>
-				  </component>
-				  <component id="powerstate" name="HW Resource Management Power State API">
+				</component>
+				<component id="powerstate" name="HW Resource Management Power State API">
 					<unit bldFile="sf/os/devicesrv/devicesrv_pub/hwrm_power_state_api/tsrc/bc/powerstate/group"/>
-				  </component>
-				  <component id="sysutil" name="System Utilities API">
+				</component>
+				<component id="sysutil" name="System Utilities API">
 					<unit bldFile="sf/os/devicesrv/devicesrv_pub/sysutil_api/tsrc/bc/sysutil/group"/>
-				  </component>
-				  <component id="textresolver" name="Text Resolver API">
+				</component>
+				<component id="textresolver" name="Text Resolver API">
 					<unit bldFile="sf/os/devicesrv/devicesrv_pub/text_resolver_api/tsrc/bc/textresolver/group"/>
-				  </component>
-				  <component id="vibra" name="Vibra API">
+				</component>
+				<component id="vibra" name="Vibra API">
 					<unit bldFile="sf/os/devicesrv/devicesrv_pub/vibra_api/tsrc/bc/vibra/group"/>
-				  </component>
-				  <component id="platformvertest" name="Platform Version Test">
+				</component>
+				<component id="platformvertest" name="Platform Version Test">
 					<unit bldFile="sf/os/devicesrv/devicesrv_pub/version_info_api/tsrc/bc/platformvertest/group"/>
-				  </component>
-				  <component id="accmonapibctests" name="Accessory Monitoring API BC Test">
+				</component>
+				<component id="accmonapibctests" name="Accessory Monitoring API BC Test">
 					<unit bldFile="sf/os/devicesrv/devicesrv_pub/accessory_monitoring_api/tsrc/bc/accmonapibctests/group"/>
-				  </component>
-				  <component id="networkstatus" name="Network Status API">
+				</component>
+				<component id="networkstatus" name="Network Status API">
 					<unit bldFile="sf/mw/appsupport/appsupport_pub/network_status_api/tsrc/bc/networkstatus/group"/>
-				  </component>
-				</collection>
-				
-				<collection name="proengwrapsis" long-name="50_SP_PROENG.SIS">
-				  <component id="proeng" name="Profile Engine Wrapper">
-				    <unit bldFile="sf/mw/appsupport/appsupport_pub/profiles_engine_wrapper_api/tsrc/bc/profilesenginewrapperapi/group"/>
-				  </collection>
-				</collection>
-			</block>
+				</component>
+			</collection>
+
+			<collection name="proengwrapsis" long-name="50_SP_PROENG.SIS">
+				<component id="proeng" name="Profile Engine Wrapper">
+					<unit bldFile="sf/mw/appsupport/appsupport_pub/profiles_engine_wrapper_api/tsrc/bc/profilesenginewrapperapi/group"/>
+				</component>
+			</collection>
+		</layer>
+		<layer name="bld_test" long-name="Binary Compatability Test code build" levels="generic specific">
+			<collection name="basesvs" long-name="SVS Base API Tests">
+				<component id="basesvs" name="SVS Base API Tests" class="test">
+					<unit bldFile="sf/os/kernelhwsrv/baseapitest/basesvs/group"/>
+				</component>
+			</collection>
+
+			<collection name="graphicssvs" long-name="SVS Graphics API Tests">
+				<component id="graphicssvs" name="SVS Graphics API Tests" class="test">
+					<unit bldFile="sf/os/graphics/graphicsapitest/graphicssvs/group"/>
+				</component>
+			</collection>
+
+			<!-- OS Services SVS -->
+			<collection name="systemlibrariessvs" long-name="SVS System Libraries API Tests">
+				<component id="syslibssvs" name="SysLibs SVS Suite" class="test">
+					<unit bldFile="sf/os/ossrv/syslibsapitest/syslibssvs/group"/>
+				</component>
+			</collection>
+
+			<collection name="multimediasvs" long-name="SVS Multimedia API Tests">
+				<component id="mmsvs" name="Multimedia SVS Suite" class="test">
+					<unit bldFile="sf/os/mm/mmapitest/mmsvs/suite/group"/>
+				</component>
+			</collection>
+		</layer>
+		<layer name="post-bld" long-name="Binary Compatability SIS build" levels="generic specific">
+			<meta type="commands">
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_asp_connection.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_asp_hostconn.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_asp_newsoapclasses.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Browser_DownloadMgr.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Browser_Favourites.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_loc_landmarks.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_loc_LmkDBMgmt.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_loc_LmkSearch.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Messaging_MMSClientMTM.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Messaging_PluginBio.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_MM_DRMCAF.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_PIM_PbkDataAddEdit.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_PIM_PbkDataMgmt.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_PIM_PbkFetchAPI.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_PIM_PbkUIUtil.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_PIM_PbkVcard.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_PIM_Spdial.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_SP_PROENG.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Symbian_AudioConvertUtility.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Symbian_AudioInputStream.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Symbian_AudioOutputStream.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Symbian_AudioPlayerUtility.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Symbian_AudioRecorderUtility.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Symbian_Base.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Symbian_Ecom.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_symbian_graphics.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Symbian_ImageDecoder.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Symbian_ImageEncoder.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Symbian_T_Camera.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Symbian_T_MdaAudioToneUtility.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_Symbian_T_MidiClientUtility.pkg" />
+				<command cmd="&cmd_sisbld; interim/fbf/configs/default/common/tools/ats/bctest/pkg/50_systemsw.pkg" />
+			</meta>
 		</layer>
 	</systemModel>
-</SystemDefinition>
\ No newline at end of file
+</SystemDefinition>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/brag/brag.xsl	Thu Oct 01 13:22:04 2009 +0100
@@ -0,0 +1,60 @@
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:fn="http://www.w3.org/2005/xpath-functions"
+	>
+<xsl:template match="/">
+	<html>
+	<link href="http://developer.symbian.org/css/reset.css" rel="stylesheet" type="text/css" />
+	<link href="http://developer.symbian.org/css/portal-merged.css" rel="stylesheet" type="text/css" />
+	<link href="http://developer.symbian.org/css/iefix.css" rel="stylesheet" type="text/css" />
+	<head><title>Build Status</title></head>
+	<body>
+	<h2>Build Status</h2>
+	<table border="1">
+
+	<xsl:for-each select="stage">
+		<tr>
+		<th>Stage: <xsl:value-of select="@name"/></th>
+		</tr>
+		<xsl:for-each select="step">
+			<tr>
+			<td>Step: <xsl:value-of select="@name"/></td>
+			</tr>
+			<xsl:for-each select="failures">
+				<tr>
+				<td>Failures: <xsl:value-of select="@level"/></td>
+				<td>Number: <xsl:value-of select="count(failure)"/></td>
+				</tr>
+			</xsl:for-each>
+		</xsl:for-each>
+	</xsl:for-each>
+
+	</table>
+
+	<xsl:variable name="criticalCount" select="count(stage/step/failures[@level='critical']/failure)"/>
+	<xsl:variable name="majorCount" select="count(stage/step/failures[@level='major']/failure)"/>
+	<xsl:variable name="minorCount" select="count(stage/step/failures[@level='minor']/failure)"/>
+	<xsl:variable name="unknownCount" select="count(stage/step/failures[@level!='critical' and @level!='major' and @level!='minor']/failure)"/>
+
+	<p>Total number of critical errors = <xsl:value-of select="$criticalCount"/></p>
+	<p>Total number of major errors = <xsl:value-of select="$majorCount"/></p>
+	<p>Total number of minor errors = <xsl:value-of select="$minorCount"/></p>
+	<p>Total number of unknown errors = <xsl:value-of select="$unknownCount"/></p>
+
+	<h2>
+	Final BRAG staus: 
+	<xsl:choose>
+		<xsl:when test="$criticalCount != 0">BLACK</xsl:when>
+		<xsl:when test="$majorCount != 0">RED</xsl:when>
+		<xsl:when test="$minorCount != 0">AMBER</xsl:when>
+		<xsl:when test="$unknownCount != 0">GREEN</xsl:when>
+		<xsl:otherwise>GOLD!</xsl:otherwise>
+	</xsl:choose>
+	</h2>
+
+	</body>
+	</html>
+</xsl:template>
+
+</xsl:stylesheet>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/brag/raptorToBRAG.pl	Thu Oct 01 13:22:04 2009 +0100
@@ -0,0 +1,181 @@
+#!perl -w
+#
+# Copyright (c) 2009 Symbian Foundation Ltd
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Symbian Foundation Ltd - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Generate the BRAG-compatible XML summary of the Raptor log from the CSV output of the raptor parser
+
+use strict;
+
+use Getopt::Long;
+use Text::CSV;
+
+
+my $raptorSummary;
+my $help = 0;
+GetOptions((
+	'raptorsummary=s' => \$raptorSummary,
+	'help!' => \$help
+));
+
+$help = 1 if (!$raptorSummary);
+if ($help)
+{
+	print "Generate an XML summary of the Raptor build from a summary.csv file\n";
+	print "Usage: perl summarize.pl --raptorsummary=CSV\n";
+	exit(0);
+}
+
+# Start to build structure to be output as XML (same format as XML::Parser would create for us)
+my $xmlNewline = bless { Text => "\n" }, "Characters";
+my $data = [bless {name => "build", Kids => [ $xmlNewline ] }, "stage"];
+# Get a shortcut reference to the bit we will use a lot
+my $buildStage = $data->[0];
+
+# READ SUMMARY.CSV FILE
+open(CSV, $raptorSummary);
+my $csv = Text::CSV->new();
+while (my $line = <CSV>)
+{
+	chomp $line;
+	
+	unless ($csv->parse($line))
+	{
+		my $err = $csv->error_input();
+		warn "Failed to parse $raptorSummary line line $. as CSV '$line': $err  Skipping\n";
+		next;
+	}
+	
+	my @keys = qw{category subcategory severity config component phase recipe file linenum};
+	my @values = $csv->fields();
+	unless (scalar @keys == scalar @keys)
+	{
+		warn "WARNING: line does not match expected format at $raptorSummary line $.. Skipping\n";
+		next;
+	}
+	
+	my $failure = {};
+	@{$failure}{@keys} = @values;
+	
+	if (!$failure->{category})
+	{
+		warn "WARNING: summary line without a category at $raptorSummary line $.. Skipping\n";
+		next;
+	}
+	
+	if ($failure->{category} =~ m{^recipe_failure$}i and !$failure->{component})
+	{
+		warn "WARNING: recipe_failure with component field empty at $raptorSummary line $.. Skipping\n";
+		next;
+	}
+	$failure->{subcategory} ||= 'uncategorized';
+	$failure->{severity} ||= 'unknown';
+	
+	# Look through the steps to see if we already have one to match this config
+	my $step;
+	foreach (@{$buildStage->{Kids}})
+	{
+		next unless ref $_ eq "step";
+		if ($_->{name} eq $failure->{config})
+		{
+			$step = $_;
+			last;
+		}
+	}
+	unless ($step)
+	{
+		# First item found in this step - create step entry
+		$step = bless { name => $failure->{config}, Kids => [ $xmlNewline ] }, "step";
+		push @{$buildStage->{Kids}}, $step, $xmlNewline;
+	}
+	
+	# Look through the sets of failures in this step to see if we hve one which matches this severity
+	my $failureSet;
+	foreach (@{$step->{Kids}})
+	{
+		next unless ref $_ eq "failures";
+		if ($_->{level} eq $failure->{severity})
+		{
+			$failureSet = $_;
+			last;
+		}
+	}
+	unless ($failureSet)
+	{
+		# First item found at this severity - create failures entry
+		$failureSet = bless { level => $failure->{severity}, Kids => [ $xmlNewline ] }, "failures";
+		push @{$step->{Kids}}, $failureSet, $xmlNewline;
+	}
+
+	# Now create the failure itself, and add it to this failure set
+	my $failureItem = bless { href => "", Kids => [ bless { Text => $failure->{subcategory} }, "Characters" ] }, "failure";
+	push @{$failureSet->{Kids}}, $failureItem, $xmlNewline;
+}
+close(CSV);
+
+# Print XML
+print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+print "<?xml-stylesheet type='text/xsl' href='brag.xsl'?>\n";
+printTree($data->[0]);
+print "\n";
+
+exit(0);
+
+sub printTree
+{
+	my $tree = shift or die;
+	die unless ref $tree;
+
+	my $tagName = ref $tree;
+	$tagName =~ s{^main::}{};
+	if ($tagName eq "Characters")
+	{
+		print $tree->{Text};
+		return;
+	}
+	
+	print "<$tagName";
+
+	foreach my $attr (
+		sort {
+			my $order = "name level start stop href";
+			my $ixA = index $order, $a;
+			my $ixB = index $order, $b;
+			die "$a $b" if $ixA + $ixB == -2;
+			$ixA - $ixB;
+		}
+		grep {
+			! ref $tree->{$_}
+		}
+		keys %$tree)
+	{
+		print " $attr=\"$tree->{$attr}\"";
+	}
+
+	my $children = $tree->{Kids} || [];
+	if (scalar @$children)
+	{
+		print ">";
+		foreach my $child (@$children)
+		{
+			printTree($child);
+		}
+		print "</$tagName";
+	}
+	else
+	{
+		print "/"
+	}
+
+	print ">";
+}
+