merge
authorBrendan Donegan brendand@symbian.org
Wed, 07 Oct 2009 11:12:20 +0100
changeset 613 f2e526e44405
parent 612 78ccc60a13b1 (current diff)
parent 610 4a27eba1d297 (diff)
child 614 ebd02353c4d9
merge
common/diamonds/sf-tag-build.xml.ftl
common/tools/ats/bctest/contacts/phonebook/phonebook.xml
common/tools/ats/bctest/multimedia/multimediasvs.pl
common/tools/ats/bctest/package_definition.xml
common/tools/ats/bctest/syslibs/syslibstest.xml
--- a/build.xml	Wed Oct 07 11:09:46 2009 +0100
+++ b/build.xml	Wed Oct 07 11:12:20 2009 +0100
@@ -6,7 +6,11 @@
   <property name="sf.subproject.path" value=""/>
   <property name="sf.project.location" value="${sf.config.dir}/../build/config/${sf.subproject.path}"/>
   <property name="sf.project.name" value="job"/>
-     
+   
+  <target name="set-arm-version"/>
+  <target name="check-env-arm-license"/>
+  <target name="get-arm-license"/>
+  
   <!-- import job properties -->
   <import file="${sf.project.location}/${sf.project.name}_props.ant.xml" optional="yes"/>
   
--- a/common/build.postbuild.xml	Wed Oct 07 11:09:46 2009 +0100
+++ b/common/build.postbuild.xml	Wed Oct 07 11:12:20 2009 +0100
@@ -283,7 +283,8 @@
             <then>
             <runtarget target="sf-run-analysis-diamonds"/>
             </then>
-        </if>    
+        </if>
+	<runtarget target="sf-brag-to-diamonds"/>
     </target>
 
     <target name="sf-run-analysis-ant">    
@@ -296,6 +297,7 @@
 
     <target name="sf-run-analysis-raptor">            
       <echo message="Preprocessing *_compile.log files"/>
+      <delete file="${build.log.dir}/analysis/${build.id}_preprocess.log"/>
       <for param="logfile">
         <path>
           <fileset dir="${build.log.dir}">
@@ -306,9 +308,10 @@
         <sequential>
           <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">
+          <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" input="@{logfile}" output="${build.log.dir}/analysis/${preprocessedlogfile}" errorProperty="@{logfile}" >
             <arg value="${sf.common.config.dir}/tools/raptor/preprocess_log.pl"/>
           </exec>
+	  <echo file="${build.log.dir}/analysis/${build.id}_preprocess.log" append="true" message="${@{logfile}}${line.separator}"/>
         </sequential>
       </for>
       
@@ -484,8 +487,67 @@
           files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
         </data>
       </fmpp>
+      <!-- Send the data to the server -->
+	  <exec executable="python">
+		    <arg value="${sf.common.config.dir}/tools/brag/send_xml_to_diamonds.py"/>
+		    <arg value="-s"/>
+		    <arg value="${diamonds.host}"/>
+		    <arg value="-u"/>
+		    <arg value="${diamonds.build.id}"/>
+		    <arg value="-f"/>
+		    <arg value="${build.log.dir}/sf-run-analysis.xml"/>
+	  </exec>
     </target>    
 
+    <target name="sf-brag-to-diamonds">
+        <!-- Merge all our bits of XML together -->
+        <exec executable="perl" output="${build.log.dir}/summary/_BRAG.xml">
+            <arg value="${sf.common.config.dir}/tools/mergeXML.pl"/>
+            <arg value="--xsl=brag.xsl"/>
+            <arg value="--merge=buildStatus,phase(name),step(name),failures(level)"/>
+            <arg value="${build.log.dir}/summary/*?_BRAG.xml"/>
+        </exec>
+        <!-- Run XSL transform to create file to send to diamonds -->
+        <java jar="${sf.common.config.dir}/sysdefdowngrade/xalan-j_2_7_1/xalan.jar" fork="true">
+            <arg value="-IN"/>
+            <arg value="${build.log.dir}/summary/_BRAG.xml"/>
+            <arg value="-XSL"/>
+            <arg value="${sf.common.config.dir}/tools/brag/bragForDiamonds.xsl"/>
+            <arg value="-OUT"/>
+            <arg value="${temp.build.dir}/bragForDiamonds.xml"/>
+        </java>
+        <if>
+            <istrue value="${sf.spec.publish.enable}"/>
+            <then>
+                <!-- Try to obtain the diamonds ID for this build -->
+                <if>
+                    <not><isset property="diamonds.build.id"/></not>
+                    <then>
+                        <property file="${build.log.dir}/diamonds_build_id.properties"/> <!-- This will fail silently -->
+                    </then>
+                </if>
+                <if>
+                    <isset property="diamonds.build.id"/>
+                    <then>
+                        <!-- Send the data to the server -->
+                        <exec executable="python">
+                            <arg value="${sf.common.config.dir}/tools/brag/send_xml_to_diamonds.py"/>
+                            <arg value="-s"/>
+                            <arg value="${diamonds.host}"/>
+                            <arg value="-u"/>
+                            <arg value="${diamonds.build.id}"/>
+                            <arg value="-f"/>
+                            <arg value="${temp.build.dir}/bragForDiamonds.xml"/>
+                        </exec>
+                    </then>
+                    <else>
+                        <echo message="diamonds.build.id is not known - unable to push any build specific information to diamonds server"/>
+                    </else>
+                </if>
+            </then>
+        </if>
+    </target>
+
     <target name="sf-check-utilities-dir">
         <available property="sf-utilities-available" file="${build.drive}/utilities" type="dir"/>
     </target>
@@ -638,6 +700,46 @@
             <reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
             <reference refid="sf.spec.s60.system.definition.files" torefid="system.definition.files" />
         </antcall>
+        
+    </target>
+    
+    <target name="sf-create-public-PDK" depends="sf-prebuild,sf-run-sfl-licence-munging" >
+        <if>
+            <istrue value="${sf.spec.md5.enable}"/>
+            <then>
+                <echo message="INFO Creating MD5s"/>
+                <runtarget target="sf-run-evalid"/>
+            </then>
+        </if>
+        
+        <!-- Package up the binaries we built -->
+        <if>
+            <istrue value="${sf.spec.package.bin.enable}"/>
+            <then>
+                <echo message="INFO Packaging Binaries"/>
+                <runtarget target="sf-package-binary"/>
+                <runtarget target="sf-package-tools"/>
+
+                <echo message="INFO Validate Zip files"/>
+                <runtarget target="sf-package-validate"/>
+            </then>
+        </if>
+        <runtarget target="sf-zip-logs"/>
+        <if>
+            <istrue value="${sf.spec.publish.enable}" />
+            <then>
+                <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
+                <runtarget target="sf-publish"/>
+            </then>
+        </if>
+    </target>
+
+
+    <target name="sf-run-sfl-licence-munging" depends="sf-check-utilities-dir" if="sf-utilities-available">    
+        <echo message="Running SFL Licence Munging writing log to ${build.log.dir}"/>
+        <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/postbuild_sfl-licence_munging_results.log">
+          <arg value="${build.drive}/utilities/williamr/convert_to_eula.pl"/>
+        </exec>
     </target>
 
 </project>
--- a/common/build.test.xml	Wed Oct 07 11:09:46 2009 +0100
+++ b/common/build.test.xml	Wed Oct 07 11:12:20 2009 +0100
@@ -159,7 +159,7 @@
         <exec executable="perl" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
             <arg value="smoketest.pl"/>
         </exec>
-        <copy file="${build.drive}/smoketest/group/smoketest.zip" todir="${sf.spec.test.package.location}"/>
+        <copy file="${build.drive}/smoketest/group/smoketest.zip" todir="${sf.spec.test.package.location}"  failonerror="false"/>
         
         <echo message="INFO Updating smoketest package with test info"/>
         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
--- a/common/build.xml	Wed Oct 07 11:09:46 2009 +0100
+++ b/common/build.xml	Wed Oct 07 11:12:20 2009 +0100
@@ -23,6 +23,7 @@
     <property name="diamonds.host" value="${sf.spec.publish.diamonds.server}"/>
     <property name="diamonds.port" value="${sf.spec.publish.diamonds.port}"/>
     <property name="diamonds.path" value="${sf.spec.publish.diamonds.path}"/>
+    <property name="build.family" value="${sf.spec.job.name}"/>
     <property name="build.system" value="${sf.spec.build.system}"/>
     <property name="base_release.path" value="${sf.spec.baseline.location}"/>
     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
@@ -30,23 +31,14 @@
 	<property name="ats.drive" value="${sf.spec.ats_worker.drive}"/>
     
     <if>
-      <equals arg1="${sf.spec.publish.diamonds.tag}" arg2="test"/>
-      <then>
-        <property name="sf.test.tag" value=".test"/>
-      </then>
-      <else>
-        <property name="sf.test.tag" value=""/>
-      </else>
-    </if>
-    <property name="build.family" value="${sf.spec.job.name}_${sf.spec.job.codeline}${sf.test.tag}"/>
-    
-    <if>
       <isset property="sf.spec.sbs.numberofjobs"/>
       <then>
         <property name="number.of.threads" value="${sf.spec.sbs.numberofjobs}"/>
       </then>
     </if>
     
+    <property name="sf.diamonds.tags" value="${sf.spec.job.codeline},${sf.spec.publish.diamonds.tag}"/>
+    
     <!-- SF-specific Helium properties not meant to be exposed in the project spec -->
     <property name="diamonds.listener.configuration.file" location="${sf.common.config.dir}/diamonds/config.xml.ftl"/>
     
@@ -118,7 +110,7 @@
         </if>
         
         <echo message="Build Env against ${sf.buildenv.location}/BuildEnv.xml"/>
-        <exec executable="perl" dir="${sf.common.config.dir}/tools" failonerror="true">
+        <exec executable="perl" dir="${sf.common.config.dir}/tools" resultproperty="sf.checkenv.exit">
             <arg value="CheckBuildEnv.pl"/>
             <arg value="--xml=${sf.buildenv.location}/BuildEnv.xml"/>
             <arg value="--dbg=${build.log.dir}/BuildEnvironmentCheck.log"/>
@@ -126,6 +118,25 @@
             <arg value="--tools='${sf.spec.sbs.tools.config}'"/>
             <arg value="Common"/>
         </exec>
+        <mkdir dir="${build.log.dir}/summary" />
+        <exec executable="perl" failonerror="false" output="${build.log.dir}/summary/BuildEnvironmentCheck_BRAG.xml" logError="true">
+            <arg value="${sf.common.config.dir}/tools/brag/logToBRAG.pl"/>
+            <arg value="--phase=Prebuild"/>
+            <arg value="--step=Build Environment Check"/>
+            <arg value="--rules=${sf.common.config.dir}/tools/brag/rules.BuildEnvironmentCheck.tsv"/>
+            <arg value="${build.log.dir}/BuildEnvironmentCheck.log"/>
+        </exec>
+        <fail>
+            <condition>
+                <not>
+                    <or>
+                        <equals arg1="sf.checkenv.exit" arg2="0"/>
+                        <isset property="sf.suppress.buildenv.check"/>
+                    </or>
+                </not>
+            </condition>
+Build Environment Check failed. To stop this failure aborting the build set property sf.suppress.buildenv.check to any value.
+        </fail>
     </target>
     
     <target name="sf-summary" depends="">
@@ -199,23 +210,35 @@
     </target>
 
     <target name="sf-prebuild" depends="sf-prep,sf-prebuild-noprep"/>
-    <target name="sf-prebuild-noprep" depends="sf-prebuild-announce,sf-diamonds-tag-build,sf-record-proj-conf-bom,sf-getenvs,sf-syncsource,sf-diamondize-bom"/>
+    <target name="sf-prebuild-noprep" depends="sf-prebuild-announce,sf-diamonds-connect,sf-diamonds-tag-build,sf-record-proj-conf-bom,sf-getenvs,sf-syncsource,sf-diamondize-bom"/>
     
     <target name="sf-prebuild-announce">
         <echo>[SF-PREBUILD]</echo>
     </target>
+    
+    <target name="sf-diamonds-connect">
+      <if>
+        <istrue value="${sf.spec.publish.enable}"/>
+        <then>
+          <echo>[SF-DIAMONDS-CONNECT]</echo>
+          <runtarget target="diamonds"/>
+          <echo message="Save Diamonds build id value (${diamonds.build.id}) in a file"/>
+          <echo message="diamonds.build.id=${diamonds.build.id}" file="${build.log.dir}/diamonds_build_id.properties"/>
+        </then>
+      </if>
+    </target>
 
     <target name="sf-diamonds-tag-build">
       <if>
         <istrue value="${sf.spec.publish.enable}"/>
         <then>
           <echo>[SF-DIAMONDS-TAG-BUILD]</echo>
-          <runtarget target="diamonds"/>
-          <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-tag-build.xml.ftl" outputFile="${build.drive}/output/logs/sf-tag-build.xml">
-            <data expandProperties="yes">
-              ant: antProperties()
-            </data>
-          </fmpp>
+          <echo message="Generate ${build.drive}/output/logs/sf-diamonds-tag-build.xml with Diamonds tags for this build"/>
+          <exec executable="perl" dir="${sf.common.config.dir}/tools" failonerror="true">
+            <arg value="${sf.common.config.dir}/tools/generate_diamonds_tags_xml.pl"/>
+            <arg value="--tags=${sf.diamonds.tags}"/>
+            <arg value="--output=${build.drive}/output/logs/sf-diamonds-tag-build.xml"/>
+          </exec>
         </then>
       </if>
     </target>
@@ -436,6 +459,14 @@
             <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
             <arg value="${build.log.dir}/rnd_excludefile.txt"/>
         </exec>
+        <mkdir dir="${build.log.dir}/summary" />
+        <exec executable="perl" failonerror="false" output="${build.log.dir}/summary/PreprocessPackageConfig_BRAG.xml" logError="true">
+            <arg value="${sf.common.config.dir}/tools/brag/logToBRAG.pl"/>
+            <arg value="--phase=Prebuild"/>
+            <arg value="--step=Preprocess package config"/>
+            <arg value="--rules=${sf.common.config.dir}/tools/brag/rules.PreprocessPackageConfig.tsv"/>
+            <arg value="${build.log.dir}/zipconfig.log"/>
+        </exec>
     </target>
     
     <target name="sf-zip-content" depends="preprocess-zip-config">
--- a/common/common_props.ant.xml	Wed Oct 07 11:09:46 2009 +0100
+++ b/common/common_props.ant.xml	Wed Oct 07 11:12:20 2009 +0100
@@ -41,6 +41,7 @@
     <property name="sf.spec.sourcesync.usecache" value="false"/>
     <property name="sf.spec.sourcesync.sourcespecfile" value="sources.csv"/>
     <property name="sf.spec.sourcesync.cachelocation" value="${sf.spec.job.rootdir}/hgcache"/>
+    <property name="sf.spec.sourcesync.bug419" value="true"/> <!--Temporary workaround for bug 419 - Does source sync manually -->
     
     <property name="sf.spec.baseline.enable" value="true"/>
     <property name="sf.spec.baseline.select" value="auto"/> <!-- auto|explicit|location -->
@@ -97,8 +98,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="false"/>
-    <property name="sf.spec.bccheck.enable.ha" value="false"/>
+    <property name="sf.spec.bccheck.enable.la" value="true"/>
+    <property name="sf.spec.bccheck.enable.ha" value="true"/>
     <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/diamonds/sf-run-analysis.xml.ftl	Wed Oct 07 11:09:46 2009 +0100
+++ b/common/diamonds/sf-run-analysis.xml.ftl	Wed Oct 07 11:12:20 2009 +0100
@@ -34,9 +34,9 @@
     </file>
     <file>
       <type>log</type>
-      <name>Build Summary</name>
-      <url>file:///${ant['sf.spec.publish.networkdrive']}\${ant['sf.spec.job.name']}\builds\${ant['sf.spec.job.codeline']}\${ant['build.id']}\build_summary.html</url>
+      <name>BRAG Summary</name>
+      <url>file:///${ant['sf.spec.publish.networkdrive']}\${ant['sf.spec.job.name']}\builds\${ant['sf.spec.job.codeline']}\${ant['build.id']}\summary\_brag.xml</url>
     </file>
-  </files>
+   </files>
   
 </diamonds-build>
\ No newline at end of file
--- a/common/diamonds/sf-tag-build.xml.ftl	Wed Oct 07 11:09:46 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<diamonds-build>
-  <schema>10</schema>
-  <tags>
-    <tag>${ant['sf.spec.publish.diamonds.tag']}</tag>
-  </tags>
-</diamonds-build>
\ No newline at end of file
--- a/common/templates/source-spec.ant.xml.ftl	Wed Oct 07 11:09:46 2009 +0100
+++ b/common/templates/source-spec.ant.xml.ftl	Wed Oct 07 11:12:20 2009 +0100
@@ -17,6 +17,17 @@
   <#assign fast_sync = false />
 </#if>
 
+<#if ("${ant['sf.spec.sourcesync.bug419']}")??>
+  <#if "${ant['sf.spec.sourcesync.bug419']}" == "true">
+    <#assign bug419 = true />
+  <#else>
+    <#assign bug419 = false />
+  </#if>
+<#else>
+  <#assign bug419 = false />
+</#if>
+
+
     <!-- remove previous version of BOM file (if exists)  -->
     <target name="reset-bom-sources-csv">
         <delete file="${ant['build.drive']}/output/logs/BOM/sources.csv" quiet="true"/>
@@ -55,6 +66,19 @@
                 <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
             </exec>
             
+            <#if bug419 >
+              <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.checksum">
+                  <arg value="identify"/>
+                  <arg value="-i"/>
+                  <arg value="-r"/>
+                  <arg value="${pkg_detail.pattern}"/>
+              </exec>
+              <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}">
+                  <arg value="update"/>
+                  <arg value="-r"/>
+                  <arg value="${dollar}{sf.sourcesync.${count}.checksum}"/>
+              </exec>            
+            <#else>
             <hlm:scm verbose="true" scmUrl="scm:hg:${pkg_detail.source}">
                 <!--hlm:checkout basedir="${ant['build.drive']}${pkg_detail.dst}"/-->
                 <#if "${pkg_detail.type}"=="tag" >
@@ -71,6 +95,7 @@
                 </hlm:update>
                 </#if>
             </hlm:scm>
+            </#if>
                 <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.checksum">
                 <arg value="identify"/>
                 <arg value="-i"/>
--- a/common/tools/ats/bctest/contacts/phonebook/phonebook.xml	Wed Oct 07 11:09:46 2009 +0100
+++ b/common/tools/ats/bctest/contacts/phonebook/phonebook.xml	Wed Oct 07 11:12:20 2009 +0100
@@ -65,7 +65,7 @@
 							<param file="atsinterface.exe"/>
 							<param parameters="-testmodule testcombiner -config C:\testframework\tcbctestpbkdataaddedit.cfg"/>
                             <param result-file="c:\spd_logs\xml\testcombiner.xml"/>
-                            <param timeout="3600"/>
+                            <param timeout="300"/>
 						</params>
 					</step>
 					<step id="" name="bctestpbkdataaddedit (fetch-log)" harness="ATSINTERFACE" enabled="true" passrate="100">
@@ -836,7 +836,7 @@
 							<param file="atsinterface.exe"/>
 							<param parameters="-testmodule testcombiner -config C:\TestFramework\tcbctestsmsaddsel.cfg"/>
                             <param result-file="c:\spd_logs\xml\testcombiner.xml"/>
-                            <param timeout="3600"/>
+                            <param timeout="300"/>
 						</params>
 					</step>
 					<step id="" name="mtpbksmsaddressselect (fetch-log)" harness="ATSINTERFACE" enabled="true" passrate="100">
@@ -1013,7 +1013,7 @@
 							<param file="atsinterface.exe"/>
 							<param parameters="-testmodule testcombiner -config C:\TestFramework\tcbctestphonenumber.cfg"/>
                             <param result-file="c:\spd_logs\xml\testcombiner.xml"/>
-                            <param timeout="3600"/>
+                            <param timeout="300"/>
 						</params>
 					</step>
 					<step id="" name="mtpbkphonenumberselect (fetch-log)" harness="ATSINTERFACE" enabled="true" passrate="100">
@@ -1131,7 +1131,7 @@
 							<param file="atsinterface.exe"/>
 							<param parameters="-testmodule testcombiner -config C:\TestFramework\tcbctestmmsaddsel.cfg"/>
                             <param result-file="c:\spd_logs\xml\testcombiner.xml"/>
-                            <param timeout="3600"/>
+                            <param timeout="300"/>
 						</params>
 					</step>
 					<step id="" name="mtpbkmmsaddressselect (fetch-log)" harness="ATSINTERFACE" enabled="true" passrate="100">
@@ -1367,7 +1367,7 @@
 							<param file="atsinterface.exe"/>
 							<param parameters="-testmodule testcombiner -config C:\TestFramework\tcbctestemaioversms.cfg"/>
                             <param result-file="c:\spd_logs\xml\testcombiner.xml"/>
-                            <param timeout="3600"/>
+                            <param timeout="300"/>
 						</params>
 					</step>
 					<step id="" name="mtpbkemailoversms (fetch-log)" harness="ATSINTERFACE" enabled="true" passrate="100">
@@ -1621,7 +1621,7 @@
 							<param file="atsinterface.exe"/>
 							<param parameters="-testmodule testcombiner -config C:\TestFramework\tcbctestfielddlg.cfg"/>
                             <param result-file="c:\spd_logs\xml\testcombiner.xml"/>
-                            <param timeout="3600"/>
+                            <param timeout="300"/>
 						</params>
 					</step>
 					<step id="" name="mtpbkselectfielddlg (fetch-log)" harness="ATSINTERFACE" enabled="true" passrate="100">
@@ -1944,7 +1944,7 @@
 							<param file="atsinterface.exe"/>
 							<param parameters="-testmodule testcombiner -config C:\TestFramework\tcspeeddial.cfg"/>
                             <param result-file="c:\spd_logs\xml\testcombiner.xml"/>
-                            <param timeout="3600"/>
+                            <param timeout="300"/>
 						</params>
 					</step>
 					<step id="" name="bctestspeeddial (fetch-log)" harness="ATSINTERFACE" enabled="true" passrate="100">
--- a/common/tools/ats/bctest/messaging/messaging.xml	Wed Oct 07 11:09:46 2009 +0100
+++ b/common/tools/ats/bctest/messaging/messaging.xml	Wed Oct 07 11:12:20 2009 +0100
@@ -142,7 +142,7 @@
 							<param file="atsinterface.exe"/>
 							<param parameters="-testmodule testcombiner -config C:\TestFramework\tcTestUIBioCombiner.cfg"/>
                             <param result-file="c:\spd_logs\xml\testcombiner.xml"/>
-                            <param timeout="3600"/>
+                            <param timeout="300"/>
 						</params>
 					</step>
 					<step id="" name="PluginBioControlAPITest (fetch-log)" harness="ATSINTERFACE" enabled="true" passrate="100">
--- a/common/tools/ats/bctest/multimedia/multimediasvs.pl	Wed Oct 07 11:09:46 2009 +0100
+++ b/common/tools/ats/bctest/multimedia/multimediasvs.pl	Wed Oct 07 11:12:20 2009 +0100
@@ -21,7 +21,7 @@
 use File::Path;
 
 unlink "multimediatest.zip";
-rmtree "temp" or die "failed : $!";
+rmtree "temp";
 
 mkpath "temp/multimediatest/general/multimedia/t_imagedecoder";
 mkpath "temp/multimediatest/general/multimedia/t_imageencoder";
--- a/common/tools/ats/bctest/package_definition.xml	Wed Oct 07 11:09:46 2009 +0100
+++ b/common/tools/ats/bctest/package_definition.xml	Wed Oct 07 11:12:20 2009 +0100
@@ -1,17 +1,50 @@
 <?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_updatebranch	"RCL_1" >
-<!ENTITY cmd_clone			"hg clone" >
-<!ENTITY cmd_cwdir			"metacmd.py cwdir" >
-<!ENTITY cmd_makedirs		"metacmd.py makedirs" >
-<!ENTITY cmd_perl			"perl" >
-<!ENTITY cmd_sisbld			"makesis" >
-<!ENTITY cmd_unzip			"7z -y x" >
-<!ENTITY cmd_update			"hg update &cmd_updatebranch;" >
-<!ENTITY cmd_wget			"wget" >
+<!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 param.updatebranch						"RCL_1" >
+<!ENTITY cmd.clone								"metacmd.py mcclone" >
+<!ENTITY cmd.copy								"metacmd.py mccopy" >
+<!ENTITY cmd.makedirs							"metacmd.py mcmakedirs" >
+<!ENTITY cmd.perl								"perl" >
+<!ENTITY cmd.sisbld								"makesis" >
+<!ENTITY cmd.unzip								"7z -y x" >
+<!ENTITY cmd.update								"hg update &param.updatebranch;" >
+<!ENTITY cmd.wget								"wget" >
+<!ENTITY dir.50_asp_connection					"sf/mw/websrv/websrv_pub/web_service_connection_api/tsrc/bc/connection/sis" >
+<!ENTITY dir.50_asp_hostconn					"sf/mw/websrv/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis" >
+<!ENTITY dir.50_asp_newsoapclasses				"sf/mw/websrv/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis" >
+<!ENTITY dir.50_Browser_DownloadMgr				"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/browser/apps/DownloadMgrBCTest/sis" >
+<!ENTITY dir.50_Browser_Favourites				"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/browser/apps/FavouritesBCTest/sis" >
+<!ENTITY dir.50_loc_landmarks					"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/location/apps/LandmarksEngine/landmarks_api/sis" >
+<!ENTITY dir.50_loc_LmkDBMgmt					"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/location/apps/LandmarksEngine/landmarks_database_management_api/sis" >
+<!ENTITY dir.50_loc_LmkSearch					"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/location/apps/LandmarksEngine/landmarks_search_api/sis" >
+<!ENTITY dir.50_Messaging_MMSClientMTM			"sf/app/messaging/msg_pub/mms_client_mtm_api/tsrc/bc/sis" >
+<!ENTITY dir.50_Messaging_PluginBio				"sf/app/messaging/msg_pub/plugin_bio_control_api/tsrc/bc/sis" >
+<!ENTITY dir.50_MM_DRMCAF						"sf/mw/drm/drm_pub/oma_drm_caf_agent_api/tsrc/bc/sis" >
+<!ENTITY dir.50_PIM_PbkDataAddEdit				"sf/app/contacts/contacts_pub/phonebook_data_addedit_ui_api/tsrc/bc/sis" >
+<!ENTITY dir.50_PIM_PbkDataMgmt					"sf/app/contacts/contacts_pub/phonebook_data_management_api/tsrc/bc/sis" >
+<!ENTITY dir.50_PIM_PbkFetchAPI					"sf/app/contacts/contacts_pub/phonebook_fetch_ui_api/tsrc/bc/sis" >
+<!ENTITY dir.50_PIM_PbkUIUtil					"sf/app/contacts/contacts_pub/phonebook_ui_utilities_api/tsrc/bc/sis" >
+<!ENTITY dir.50_PIM_PbkVcard					"sf/app/contacts/contacts_pub/phonebook_vcard_importexport_api/tsrc/bc/sis" >
+<!ENTITY dir.50_PIM_Spdial						"sf/app/contacts/contacts_pub/speed_dial_utility_control_api/tsrc/bc/sis" >
+<!ENTITY dir.50_SP_PROENG						"sf/mw/appsupport/appsupport_pub/profiles_engine_wrapper_api/tsrc/BC/ProfilesEngineWrapperAPI/sis" >
+<!ENTITY dir.50_Symbian_AudioConvertUtility		"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/multimedia/mmf/T_MdaAudioConvertUtility/sis" >
+<!ENTITY dir.50_Symbian_AudioInputStream		"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/multimedia/mmf/T_MdaAudioInputStream/sis" >
+<!ENTITY dir.50_Symbian_AudioOutputStream		"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/multimedia/mmf/T_MdaAudioOutputStream/sis" >
+<!ENTITY dir.50_Symbian_AudioPlayerUtility		"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/multimedia/mmf/T_MdaAudioPlayerUtility/sis" >
+<!ENTITY dir.50_Symbian_AudioRecorderUtility	"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/multimedia/mmf/T_MdaAudioRecorderUtility/sis" >
+<!ENTITY dir.50_Symbian_Base					"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/base/sis" >
+<!ENTITY dir.50_Symbian_Ecom					"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/SysLibs/ecom/sis" >
+<!ENTITY dir.50_symbian_graphics				"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/graphics/sis" >
+<!ENTITY dir.50_Symbian_ImageDecoder			"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/multimedia/icl/T_ImageDecoder/sis" >
+<!ENTITY dir.50_Symbian_ImageEncoder			"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/multimedia/icl/T_ImageEncoder/sis" >
+<!ENTITY dir.50_Symbian_T_Camera				"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/multimedia/ecam/T_Camera/sis" >
+<!ENTITY dir.50_Symbian_T_MdaAudioToneUtility	"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/multimedia/mmf/T_MdaAudioToneUtility/sis" >
+<!ENTITY dir.50_Symbian_T_MidiClientUtility		"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/symbian/apps/multimedia/mmf/T_MidiClientUtility/sis" >
+<!ENTITY dir.50_systemsw						"sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/apps/systemsw/sis" >
+
 
 <!ELEMENT SystemDefinition ( systemModel | layer | package | collection | component)>
 <!ATTLIST SystemDefinition
@@ -112,42 +145,48 @@
 ]>
 <SystemDefinition name="Foundation" schema="2.0.1">
 	<systemModel>
-		<layer name="pre-bld" long-name="Binary Compatability Sync" levels="generic specific">
+		<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_update;" dir="sf/mw/drm" />
-				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/mw/locationsrv			sf/mw/locationsrv" />
-				<command cmd="&cmd_update;" dir="sf/mw/locationsrv" />
-				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/mw/messagingmw			sf/mw/messagingmw" />
-				<command cmd="&cmd_update;" dir="sf/mw/messagingmw" />
-				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/mw/mmmw					sf/mw/mmmw" />
-				<command cmd="&cmd_update;" dir="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;" dir="sf/os/graphics" />
-				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/os/kernelhwsrv			sf/os/kernelhwsrv" />
-				<command cmd="&cmd_update;" dir="sf/os/kernelhwsrv" />
-				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/os/mm						sf/os/mm" />
-				<command cmd="&cmd_update;" dir="sf/os/mm" />
-				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/os/ossrv					sf/os/ossrv" />
-				<command cmd="&cmd_update;" dir="sf/os/ossrv" />
-				<command cmd="&cmd_clone;		&codeline_sfl_mcl;/sf/os/shortlinksrv			sf/os/shortlinksrv" />
-				<command cmd="&cmd_update;" dir="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_makedirs;	xvid" />
-				<command cmd="&cmd_unzip;		xvid.zip xvid/" />
-				<command cmd="&cmd_perl;		sftools/ana/compatanamdw/apicompatanamdw/bcdrivers/src/bcdrivers/group/SetEnv.pl" />
+				<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.update;"		dir="interim/fbf/configs/default" />
+				<command cmd="&cmd.clone;		&codeline.sfl.fcl;/sf/app/contacts				sf/app/contacts" />
+				<command cmd="&cmd.update;"		dir="sf/app/contacts" />
+				<command cmd="&cmd.clone;		&codeline.sfl.fcl;/sf/app/messaging				sf/app/messaging" />
+				<command cmd="&cmd.update;"		dir="sf/app/messaging" />
+				<command cmd="&cmd.clone;		&codeline.sfl.fcl;/sf/mw/appsupport				sf/mw/appsupport" />
+				<command cmd="&cmd.update;"		dir="sf/mw/appsupport" />
+				<command cmd="&cmd.clone;		&codeline.sfl.mcl;/sf/mw/drm					sf/mw/drm" />
+				<command cmd="&cmd.update;"		dir="sf/mw/drm" />
+				<command cmd="&cmd.clone;		&codeline.sfl.mcl;/sf/mw/locationsrv			sf/mw/locationsrv" />
+				<command cmd="&cmd.update;"		dir="sf/mw/locationsrv" />
+				<command cmd="&cmd.clone;		&codeline.sfl.mcl;/sf/mw/messagingmw			sf/mw/messagingmw" />
+				<command cmd="&cmd.update;"		dir="sf/mw/messagingmw" />
+				<command cmd="&cmd.clone;		&codeline.sfl.mcl;/sf/mw/mmmw					sf/mw/mmmw" />
+				<command cmd="&cmd.update;"		dir="sf/mw/mmmw" />
+				<command cmd="&cmd.clone;		&codeline.sfl.fcl;/sf/mw/websrv					sf/mw/websrv" />
+				<command cmd="&cmd.update;"		dir="sf/mw/websrv" />
+				<command cmd="&cmd.clone;		&codeline.sfl.fcl;/sf/os/devicesrv				sf/os/devicesrv" />
+				<command cmd="&cmd.update;"		dir="sf/os/devicesrv" />
+				<command cmd="&cmd.clone;		&codeline.sfl.mcl;/sf/os/graphics				sf/os/graphics" />
+				<command cmd="&cmd.update;"		dir="sf/os/graphics" />
+				<command cmd="&cmd.clone;		&codeline.sfl.mcl;/sf/os/kernelhwsrv			sf/os/kernelhwsrv" />
+				<command cmd="&cmd.update;"		dir="sf/os/kernelhwsrv" />
+				<command cmd="&cmd.clone;		&codeline.sfl.mcl;/sf/os/mm						sf/os/mm" />
+				<command cmd="&cmd.update;"		dir="sf/os/mm" />
+				<command cmd="&cmd.clone;		&codeline.sfl.mcl;/sf/os/ossrv					sf/os/ossrv" />
+				<command cmd="&cmd.update;"		dir="sf/os/ossrv" />
+				<command cmd="&cmd.clone;		&codeline.sfl.mcl;/sf/os/shortlinksrv			sf/os/shortlinksrv" />
+				<command cmd="&cmd.update;"		dir="sf/os/shortlinksrv" />
+				<command cmd="&cmd.clone;		&codeline.sfl.fcl;/sftools/ana/compatanamdw		sftools/ana/compatanamdw" />
+				<command cmd="&cmd.update;"		dir="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">
@@ -276,40 +315,41 @@
 				</component>
 			</collection>
 		</layer>
-		<layer name="post-bld" long-name="Binary Compatability SIS build" levels="generic specific">
+		<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" />
+				<command cmd="&cmd.makedirs;	sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_asp_connection;					&dir.50_asp_connection;/50_asp_connection.pkg								sis/50_asp_connection.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_asp_hostconn; 					&dir.50_asp_hostconn;/50_asp_hostconn.pkg									sis/50_asp_hostconn.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_asp_newsoapclasses;		 		&dir.50_asp_newsoapclasses;/50_asp_newsoapclasses.pkg						sis/50_asp_newsoapclasses.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Browser_DownloadMgr; 				&dir.50_Browser_DownloadMgr;/50_Browser_DownloadMgr.pkg						sis/50_Browser_DownloadMgr.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Browser_Favourites; 				&dir.50_Browser_Favourites;/50_Browser_Favourites.pkg						sis/50_Browser_Favourites.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_loc_landmarks; 					&dir.50_loc_landmarks;/50_loc_landmarks.pkg									sis/50_loc_landmarks.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_loc_LmkDBMgmt;		 			&dir.50_loc_LmkDBMgmt;/50_loc_LmkDBMgmt.pkg									sis/50_loc_LmkDBMgmt.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_loc_LmkSearch;		 			&dir.50_loc_LmkSearch;/50_loc_LmkSearch.pkg									sis/50_loc_LmkSearch.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Messaging_MMSClientMTM;	 		&dir.50_Messaging_MMSClientMTM;/50_Messaging_MMSClientMTM.pkg				sis/50_Messaging_MMSClientMTM.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Messaging_PluginBio; 				&dir.50_Messaging_PluginBio;/50_Messaging_PluginBio.pkg						sis/50_Messaging_PluginBio.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_MM_DRMCAF; 						&dir.50_MM_DRMCAF;/50_MM_DRMCAF.pkg											sis/50_MM_DRMCAF.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_PIM_PbkDataAddEdit;		 		&dir.50_PIM_PbkDataAddEdit;/50_PIM_PbkDataAddEdit.pkg						sis/50_PIM_PbkDataAddEdit.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_PIM_PbkDataMgmt; 					&dir.50_PIM_PbkDataMgmt;/50_PIM_PbkDataMgmt.pkg								sis/50_PIM_PbkDataMgmt.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_PIM_PbkFetchAPI; 					&dir.50_PIM_PbkFetchAPI;/50_PIM_PbkFetchAPI.pkg								sis/50_PIM_PbkFetchAPI.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_PIM_PbkUIUtil; 					&dir.50_PIM_PbkUIUtil;/50_PIM_PbkUIUtil.pkg									sis/50_PIM_PbkUIUtil.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_PIM_PbkVcard; 					&dir.50_PIM_PbkVcard;/50_PIM_PbkVcard.pkg									sis/50_PIM_PbkVcard.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_PIM_Spdial; 						&dir.50_PIM_Spdial;/50_PIM_Spdial.pkg										sis/50_PIM_Spdial.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_SP_PROENG;	 					&dir.50_SP_PROENG;/50_SP_PROENG.pkg											sis/50_SP_PROENG.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Symbian_AudioConvertUtility; 		&dir.50_Symbian_AudioConvertUtility;/50_Symbian_AudioConvertUtility.pkg		sis/50_Symbian_AudioConvertUtility.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Symbian_AudioInputStream; 		&dir.50_Symbian_AudioInputStream;/50_Symbian_AudioInputStream.pkg			sis/50_Symbian_AudioInputStream.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Symbian_AudioOutputStream; 		&dir.50_Symbian_AudioOutputStream;/50_Symbian_AudioOutputStream.pkg			sis/50_Symbian_AudioOutputStream.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Symbian_AudioPlayerUtility;	 	&dir.50_Symbian_AudioPlayerUtility;/50_Symbian_AudioPlayerUtility.pkg		sis/50_Symbian_AudioPlayerUtility.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Symbian_AudioRecorderUtility; 	&dir.50_Symbian_AudioRecorderUtility;/50_Symbian_AudioRecorderUtility.pkg	sis/50_Symbian_AudioRecorderUtility.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Symbian_Base; 					&dir.50_Symbian_Base;/50_Symbian_Base.pkg									sis/50_Symbian_Base.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Symbian_Ecom; 					&dir.50_Symbian_Ecom;/50_Symbian_Ecom.pkg									sis/50_Symbian_Ecom.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_symbian_graphics; 				&dir.50_symbian_graphics;/50_symbian_graphics.pkg							sis/50_symbian_graphics.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Symbian_ImageDecoder; 			&dir.50_Symbian_ImageDecoder;/50_Symbian_ImageDecoder.pkg					sis/50_Symbian_ImageDecoder.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Symbian_ImageEncoder; 			&dir.50_Symbian_ImageEncoder;/50_Symbian_ImageEncoder.pkg					sis/50_Symbian_ImageEncoder.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Symbian_T_Camera;	 				&dir.50_Symbian_T_Camera;/50_Symbian_T_Camera.pkg							sis/50_Symbian_T_Camera.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Symbian_T_MdaAudioToneUtility;	&dir.50_Symbian_T_MdaAudioToneUtility;/50_Symbian_T_MdaAudioToneUtility.pkg	sis/50_Symbian_T_MdaAudioToneUtility.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_Symbian_T_MidiClientUtility;		&dir.50_Symbian_T_MidiClientUtility;/50_Symbian_T_MidiClientUtility.pkg		sis/50_Symbian_T_MidiClientUtility.sis" />
+				<command cmd="&cmd.sisbld;		-d&dir.50_systemsw;							&dir.50_systemsw;/50_systemsw.pkg											sis/50_systemsw.sis" />
 			</meta>
 		</layer>
 	</systemModel>
--- a/common/tools/brag/brag.xsl	Wed Oct 07 11:09:46 2009 +0100
+++ b/common/tools/brag/brag.xsl	Wed Oct 07 11:12:20 2009 +0100
@@ -1,24 +1,52 @@
 <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="/">
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions">
+
+<!-- Initialise keys (sort of like hashes?) to enable us to list distinct packages/severities -->
+<xsl:key name="packages" match="failure" use="@package"/>
+<xsl:key name="severities" match="failures" use="@severity"/>
+
+<!-- Main template -->
+<xsl:template match="/buildStatus">
 	<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>
+	<h1>Build Status</h1>
+
+	<xsl:variable name="criticalCount" select="count(phase/step/failures[@level='critical']/failure)"/>
+	<xsl:variable name="majorCount" select="count(phase/step/failures[@level='major']/failure)"/>
+	<xsl:variable name="minorCount" select="count(phase/step/failures[@level='minor']/failure)"/>
+	<xsl:variable name="unknownCount" select="count(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/failure)"/>
+
+	<h2>
+	Overall BRAGG 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>
+
+	<h2>Breakdown by severity</h2>
+	<table border="1">
+	<tr><td>Critical</td><td><xsl:value-of select="$criticalCount"/></td></tr>
+	<tr><td>Major</td><td><xsl:value-of select="$majorCount"/></td></tr>
+	<tr><td>Minor</td><td><xsl:value-of select="$minorCount"/></td></tr>
+	<tr><td>Unknown</td><td><xsl:value-of select="$unknownCount"/></td></tr>
+	<tr><th>Grand total</th><th><xsl:value-of select="count(phase/step/failures/failure)"/></th></tr>
+	</table>
+
+	<h2>Breakdown by phase/step</h2>
 	<table border="1">
 
-	<xsl:for-each select="stage">
+	<xsl:for-each select="phase">
 		<tr>
-		<th>Stage: <xsl:value-of select="@name"/></th>
+		<th colspan='2'>Phase: <xsl:value-of select="@name"/></th>
 		</tr>
 		<xsl:for-each select="step">
 			<tr>
-			<td>Step: <xsl:value-of select="@name"/></td>
+			<td colspan='2'>Step: <xsl:value-of select="@name"/></td>
 			</tr>
 			<xsl:for-each select="failures">
 				<tr>
@@ -31,26 +59,18 @@
 
 	</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>
+	<!-- If any failures are tied to a specific package... -->
+	<xsl:if test="phase/step/failures/failure[@package]">
+		<h2>Breakdown by package</h2>
+		<table border="1">
+		<tr><th>Package</th><th>Total failures</th></tr>
+		<!-- Use the Muenchian Method to get a set of distinct packages -->
+		<xsl:for-each select="phase/step/failures/failure[generate-id(.) = generate-id(key('packages', @package))]">
+			<xsl:sort select="@package"/>
+			<tr><td><xsl:value-of select="@package"/></td><td><xsl:value-of select="count(key('packages', @package))"/></td></tr>
+		</xsl:for-each>
+		</table>
+	</xsl:if>
 
 	</body>
 	</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/brag/bragForDiamonds.xsl	Wed Oct 07 11:12:20 2009 +0100
@@ -0,0 +1,27 @@
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- Main template -->
+<xsl:template match="/buildStatus">
+	<xsl:variable name="criticalCount" select="count(phase/step/failures[@level='critical']/failure)"/>
+	<xsl:variable name="majorCount" select="count(phase/step/failures[@level='major']/failure)"/>
+	<xsl:variable name="minorCount" select="count(phase/step/failures[@level='minor']/failure)"/>
+	<xsl:variable name="unknownCount" select="count(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/failure)"/>
+
+	<diamonds-build>
+	<schema>13</schema>
+	<build>
+	<status>
+	<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>
+	</status>
+	</build>
+	</diamonds-build>
+</xsl:template>
+
+</xsl:stylesheet>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/brag/logToBRAG.pl	Wed Oct 07 11:12:20 2009 +0100
@@ -0,0 +1,183 @@
+#!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:
+# Identifies failures in a log file (as determined by a set of rules) and produces a BRAG XML summary
+
+use strict;
+
+use Getopt::Long;
+
+my $phaseName;
+my $stepName;
+my $rulesFile;
+my $help = 0;
+GetOptions((
+	'phase=s' => \$phaseName,
+	'step=s' => \$stepName,
+	'rules=s' => \$rulesFile,
+	'help!' => \$help,
+));
+
+my $wrongArgs = 0;
+unless ($help)
+{
+	$wrongArgs += warn "No phase specified to indicate the phase that the failures fall under\n" unless defined $phaseName;
+	$wrongArgs += warn "No step specified to indicate the step that the failures fall under\n" unless defined $stepName;
+	$wrongArgs += warn "No file of rules specified to interpret the log file\n" unless defined $rulesFile;
+	$wrongArgs += warn "No log files to process\n" unless @ARGV;
+}
+if ($help || $wrongArgs)
+{
+	print <<"EOT";
+
+logToBRAG.pl --phase=prebuild --step=syncsource --rules=syncsourceRules.tsv presync.log [doSync.log ...] > output.xml
+EOT
+	exit(0 + !$help);
+}
+
+# Do the wild-carding thing
+@ARGV = map { glob $_ } @ARGV;
+
+# 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 $step = bless {
+	name => $stepName,
+	Kids => [ $xmlNewline ]
+}, "step";
+my $phase = bless {
+	name => $phaseName,
+	Kids => [ $xmlNewline, $step, $xmlNewline ]
+}, "phase";
+my $buildStatus = [ bless {
+	Kids =>
+	[
+		$xmlNewline,
+		$phase,
+		$xmlNewline,
+	]
+}, "buildStatus"];
+
+# Also create empty <failures> tags with severities in a sensible order
+# And shortcuts to those items
+my $severityShortcut = {};
+foreach my $severity (qw{critical major minor})
+{
+	my $failureSet = bless { level => $severity, Kids => [ $xmlNewline ] }, "failures";
+	push @{$step->{Kids}}, $failureSet, $xmlNewline;
+	$severityShortcut->{$severity} = $failureSet;
+}
+
+# Read rules file
+my @rules;
+open(TSV, $rulesFile) or die "Unable to open rules file '$rulesFile'\n";
+while (my $line = <TSV>)
+{
+	chomp $line;
+	next unless $line;
+	my @terms = split m{\t+}, $line;
+	die "Rules file not formatted as expected at line $.\n" unless scalar @terms == 2;
+	push @rules, { regexp => qr{$terms[0]}, severity => $terms[1] };
+}	
+
+# Iterate through all the lines of all the files in @ARGV
+while (my $line = <>)
+{
+	chomp $line;
+	foreach my $rule (@rules)
+	{
+		if ($line =~ m[$rule->{regexp}])
+		{
+			last if $rule->{severity} eq "ignore";
+			# We found a match
+			my $failure = bless{ Kids => [ bless { Text => $line }, "Characters" ] }, "failure";
+			# Ensure we have a <failures> tag for this severity
+			if (!exists $severityShortcut->{$rule->{severity}})
+			{
+				# Create the failure set and add it to the shortcut list too
+				my $failureSet = bless { level => $rule->{severity}, Kids => [ $xmlNewline ] }, "failures";
+				push @{$step->{Kids}}, $failureSet, $xmlNewline;
+				$severityShortcut->{$rule->{severity}} = $failureSet;
+			}
+			push @{$severityShortcut->{$rule->{severity}}->{Kids}}, $failure, $xmlNewline;
+			# Do not consider any more rules
+			last;
+		}
+	}
+}
+
+# Print XML
+print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+print "<?xml-stylesheet type='text/xsl' href='brag.xsl'?>\n";
+printTree($buildStatus->[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 escapeForXML($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 ">";
+}
+
+sub escapeForXML
+{
+	$_ = shift;
+	s{&}{&amp;}g;
+	s{<}{&lt;}g;
+	s{>}{&gt;}g;
+	return $_;
+}
--- a/common/tools/brag/raptorToBRAG.pl	Wed Oct 07 11:09:46 2009 +0100
+++ b/common/tools/brag/raptorToBRAG.pl	Wed Oct 07 11:12:20 2009 +0100
@@ -37,9 +37,23 @@
 
 # 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"];
+my $buildStatus =
+[
+	bless
+	{
+		Kids =>
+		[
+			$xmlNewline,
+			bless
+			{
+				name => "Build",
+				Kids => [ $xmlNewline ]
+			}, "phase",
+		]
+	}, "buildStatus"
+];
 # Get a shortcut reference to the bit we will use a lot
-my $buildStage = $data->[0];
+my $buildPhase = $buildStatus->[0]->{Kids}->[-1];
 
 # READ SUMMARY.CSV FILE
 open(CSV, $raptorSummary);
@@ -63,6 +77,7 @@
 		next;
 	}
 	
+	# Populate the hash using a hash slice
 	my $failure = {};
 	@{$failure}{@keys} = @values;
 	
@@ -82,7 +97,7 @@
 	
 	# Look through the steps to see if we already have one to match this config
 	my $step;
-	foreach (@{$buildStage->{Kids}})
+	foreach (@{$buildPhase->{Kids}})
 	{
 		next unless ref $_ eq "step";
 		if ($_->{name} eq $failure->{config})
@@ -95,7 +110,13 @@
 	{
 		# First item found in this step - create step entry
 		$step = bless { name => $failure->{config}, Kids => [ $xmlNewline ] }, "step";
-		push @{$buildStage->{Kids}}, $step, $xmlNewline;
+		push @{$buildPhase->{Kids}}, $step, $xmlNewline;
+		# Also create empty <failures> tags with severities in a sensible order
+		foreach my $severity (qw{critical major minor})
+		{
+			my $failureSet = bless { level => $severity, Kids => [ $xmlNewline ] }, "failures";
+			push @{$step->{Kids}}, $failureSet, $xmlNewline;
+		}
 	}
 	
 	# Look through the sets of failures in this step to see if we hve one which matches this severity
@@ -117,7 +138,15 @@
 	}
 
 	# Now create the failure itself, and add it to this failure set
-	my $failureItem = bless { href => "", Kids => [ bless { Text => $failure->{subcategory} }, "Characters" ] }, "failure";
+	my $failureItem = bless {
+#		href => "",
+		Kids => [ bless { Text => $failure->{subcategory} }, "Characters" ]
+	}, "failure";
+	if ($failure->{component})
+	{
+		$failure->{component} =~ s{^(/sf/.*?/.*?)/.*$}{$1};
+		$failureItem->{package} = $failure->{component};
+	}
 	push @{$failureSet->{Kids}}, $failureItem, $xmlNewline;
 }
 close(CSV);
@@ -125,7 +154,7 @@
 # Print XML
 print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
 print "<?xml-stylesheet type='text/xsl' href='brag.xsl'?>\n";
-printTree($data->[0]);
+printTree($buildStatus->[0]);
 print "\n";
 
 exit(0);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/brag/rules.BuildEnvironmentCheck.tsv	Wed Oct 07 11:12:20 2009 +0100
@@ -0,0 +1,3 @@
+^SHOWSTOPPER RAISED:	critical
+^ERROR:	major
+^WARNING:	minor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/brag/rules.PreprocessPackageConfig.tsv	Wed Oct 07 11:12:20 2009 +0100
@@ -0,0 +1,1 @@
+^Warning:	minor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/brag/send_xml_to_diamonds.py	Wed Oct 07 11:12:20 2009 +0100
@@ -0,0 +1,162 @@
+command_help = """
+Send XML data from file to Diamonds. v.1.23
+Use:
+    send_xml_to_diamonds.py options
+    
+    Mandatory options:
+    -s    Server address
+    -u    Url
+    -f    path of XML file
+    
+    Optional options:
+    -m    Send only mail, without POST connection. Recommend only,
+          when direct POST connection is not available.
+    -o    mail server. Not needed inside Nokia intranet.
+    -h    help
+    
+    Examples:
+    Sending only by mail, without POST. (not recommended)
+        send_xml_to_diamonds.py -s diamonds.nmp.nokia.com -u /diamonds/builds/ -f c:\\build.xml -m buildtoolsautomation@nokia.com
+    
+    Sending a new build to release instance of Diamonds
+        send_xml_to_diamonds.py -s diamonds.nmp.nokia.com -u /diamonds/builds/ -f c:\\build.xml
+    
+    Updating test results to existing build
+        send_xml_to_diamonds.py -s diamonds.nmp.nokia.com -u /diamonds/builds/123/ -f c:\\test.xml
+    
+    Sending data for Relative Change in SW Asset metrics
+        send_xml_to_diamonds.py -s diamonds.nmp.nokia.com -u /diamonds/metrics/ -f c:\\relative.xml
+    
+    Sending data for Function Coverage
+        send_xml_to_diamonds.py -s diamonds.nmp.nokia.com -u /diamonds/tests/coverage/ -f c:\\coverage.xml
+    
+    Note: If you want to send XML to development version of Diamonds in testing purposes, use
+    address: trdeli02.nmp.nokia.com:9001 in the server address:
+        send_xml_to_diamonds.py -s trdeli02.nmp.nokia.com:9001 -u /diamonds/builds/ -f c:\\build.xml
+"""
+
+from httplib import *
+import os, sys, time, re
+
+
+def send_email(subject, body, sender, receivers, encoding, mail_server):
+    """
+    Create an email message as MIMEText instance.
+    """
+    from email.Header import Header
+    from email.MIMEText import MIMEText
+    from email.Utils import parseaddr, formataddr
+    import smtplib
+    
+    msg = MIMEText(body, "plain", encoding)
+    msg["To"] = Header(u", ".join(receivers), encoding)
+    msg["Subject"] = Header(subject, encoding)
+    
+    smtp = smtplib.SMTP() 
+    smtp.connect(mail_server)
+    smtp.sendmail(sender, receivers, msg.as_string())
+    smtp.close()
+
+def get_username():
+    platform = sys.platform
+    if platform == "win32":
+        return os.getenv("USERNAME")
+    else:
+        return os.getlogin()
+
+def get_mail_subject(sender, server, url):
+    return "[DIAMONDS_DATA] %s>>>%s>>>%s" % (sender, server, url)
+
+def get_response_message(response):
+    return "Response status:%s \
+    \nResponse reason:%s\n" \
+           % (response.status, response.reason)
+
+def get_process_time(total_time):
+    if total_time<=60:
+        return  "%s seconds" % round(total_time, 1)
+    else:
+        return "%s minutes and %s seconds" % (int(total_time/60), round((total_time%60), 1))
+
+def main():
+    start_time          = time.time()
+    server_valid        = False
+    url_valid           = False
+    sfile_valid         = False
+    mail_address        = None
+    mail_server_address = "smtp.nokia.com"
+    _                   = sys.argv.pop(0)
+    
+    while sys.argv:
+        parameter = sys.argv.pop(0)
+        if re.search('^-', parameter):
+            if parameter == '-s':
+                server       = sys.argv.pop(0)
+                server_valid = True
+            elif parameter == '-u':
+                url          = sys.argv.pop(0)
+                url_valid    = True
+            elif parameter == '-f':
+                source_file  = sys.argv.pop(0)
+                sfile_valid  = True
+                try:
+                    xml = open(source_file).read()
+                except:
+                    sys.exit("Can not open the file %s" % source_file)
+            elif parameter == '-m':
+                mail_address = sys.argv.pop(0)
+            elif parameter == '-o':
+                mail_server_address = sys.argv.pop(0)
+            elif parameter == '-h':
+                sys.exit("HELP:\n %s" % (command_help))
+            else:
+                sys.exit("Incorrect parameter! %s" % (parameter) + command_help )
+        else:
+            sys.exit("Incorrect parameter! %s" % (parameter) + command_help)
+    if not server_valid or not url_valid or not sfile_valid:
+        sys.exit("Too few parameters: Use -h for help")
+    
+    diamonds_mail_box      = "diamonds@diamonds.nmp.nokia.com"
+    import_failed_message  = "XML was not sent successfully to Diamonds via REST interface!\n"
+    import_succeed_message = "XML was sent successfully to Diamonds via REST interface.\n"
+    mail_sent_message      = "XML was sent to Diamonds by mail. Scheduled script will try to import it to Diamonds. If you can not see data soon in Diamonds, please contact to Diamonds developers.\n"
+    
+    if not mail_address:
+        connection = HTTPConnection(server)
+        
+        try:
+            connection.request("POST", url, xml)
+        except:
+            print "Can not connect to the server %s\n" % server
+            sender = get_username()
+            send_email(get_mail_subject(sender, server, url), xml, sender, [diamonds_mail_box], "latin-1", mail_server_address)
+            sys.exit(mail_sent_message)
+        
+        response = connection.getresponse()
+        
+        # More info about httplib
+        # http://docs.python.org/lib/module-httplib.html
+        if response.status == 200:
+            print import_succeed_message
+            print get_response_message(response)
+            print "Server response:%s\n" % response.read()
+        else:
+            print import_failed_message
+            print get_response_message(response)
+            sender = get_username()
+            send_email(get_mail_subject(sender, server, url), xml, sender, [diamonds_mail_box], "latin-1", mail_server_address)
+            print mail_sent_message
+        
+        connection.close()
+           
+    else:
+        print 'Sending only mail'
+        sender = get_username()
+        send_email(get_mail_subject(sender, server, url), xml, sender, [mail_address], "latin-1", mail_server_address)
+    
+    print "------------------------"
+    print "Processed in %s" % get_process_time(time.time()-start_time)
+    print "------------------------"
+
+if __name__ == "__main__":
+    main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/generate_diamonds_tags_xml.pl	Wed Oct 07 11:12:20 2009 +0100
@@ -0,0 +1,54 @@
+#! 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 an XML file in the Diamonds format to upload build tags to Diamonds
+
+use strict;
+
+use Getopt::Long;
+
+my $taglist = 0;
+my $outputfile = 0;
+my $help = 0;
+GetOptions((
+	'tags:s' => \$taglist,
+	'output:s' => \$outputfile,
+	'help!' => \$help,
+));
+
+if ($help or !$outputfile)
+{
+	print "Usage: perl generate_diamonds_tags_xml.pl --tags COMMA_SEPARATED_TAG_LIST --output OUTPUT_FILE\n";
+}
+
+open(FILE, ">$outputfile");
+
+print FILE <<_END_HEADER;
+<?xml version=\"1.0\" encoding=\"utf-8\"?>
+<diamonds-build>
+  <schema>13</schema>
+  <tags>
+_END_HEADER
+
+my @tags = split(/,/, $taglist);
+for (@tags)
+{
+	print FILE "    <tag>$_</tag>\n";
+}
+
+print FILE <<_END_TRAILER;  
+  </tags>
+</diamonds-build>
+_END_TRAILER
+
+close(FILE);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/mergeXML.pl	Wed Oct 07 11:12:20 2009 +0100
@@ -0,0 +1,193 @@
+#!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:
+# Merge a set of XML files
+
+use strict;
+
+use XML::Parser;
+use Getopt::Long;
+
+# Read option arguments
+my $howtoString;
+my $xslLink;
+my $help;
+GetOptions((
+	'xsl=s' => \$xslLink,
+	'merge=s' => \$howtoString,
+	'help!' => \$help,
+));
+
+my $wrongArgs = 0;
+unless ($help)
+{
+	$wrongArgs += warn "No merge string specified to indicate how the files should be merged\n" unless defined $howtoString;
+	$wrongArgs += warn "No files to be merged\n" unless scalar @ARGV;
+}
+if ($help || $wrongArgs)
+{
+	print <<"EOT";
+
+mergeXML.pl --xsl=brag.xsl --merge=SystemDefinition,systemModel,layer(name),block(name),package(name) sysModel1.xml [model*.xml ...] > output.xml
+EOT
+	exit(0 + !$help);
+}
+
+# Hash of tags that should be merged, with optional attribute consideration
+my $mergeTags;
+foreach my $term (split m{\s*,\s*}, $howtoString)
+{
+	my ($tag, $attribute) = $term =~ m{(\w+)\((\w+)\)};
+	$tag ||= $term;
+	$mergeTags->{$tag} = $attribute;
+}
+
+# Expand wildcards
+@ARGV = map { glob $_ } @ARGV;
+
+# Merge all the trees together
+my $outTree = mergeMultipleTrees($mergeTags, @ARGV);
+
+# Output total tree
+print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+print "<?xml-stylesheet type=\"text/xsl\" href=\"$xslLink\"?>\n" if $xslLink;
+printTree($outTree->[0]);
+print "\n";
+
+exit(0);
+
+sub mergeMultipleTrees
+{
+	my $mergeTags = shift or die;
+
+	# Create an XML parser
+	my $parser = new XML::Parser(Style => "Objects") or die;
+	
+	my $outTree;
+	# For each XML file to merge...
+	foreach my $xmlFile (@_)
+	{
+		my $tree = eval { $parser->parsefile($xmlFile) } or die "Failed to parse $xmlFile : $@";
+		if (!$outTree)
+		{
+			# The first file is taken verbatim
+			$outTree = $tree;
+		}
+		else
+		{
+			# Merge into output Tree
+			mergeTwoTrees($outTree->[0], $tree->[0], $mergeTags);
+		}
+	}
+
+	return $outTree;
+}
+
+sub mergeTwoTrees
+{
+	my $baseTree = shift or die;
+	my $extrasTree = shift or die;
+	my $mergeTags = shift or die;
+
+	die ("Trees do not match: ".(ref $baseTree)." vs ".(ref $extrasTree)) unless ref $baseTree eq ref $extrasTree;
+	return if ref $baseTree eq "main::Characters";
+
+	foreach my $extraChild (@{$extrasTree->{Kids}})
+	{
+		# Work out whether this child should be merged with a namesake, or appended
+		my $mergeIt;
+
+		my $extraChildTag = ref $extraChild;
+		$extraChildTag =~ s{^main::}{};
+		
+		if (exists $mergeTags->{$extraChildTag})
+		{
+			# Should be merged if there's already one there
+			# Look for a namesake in the base
+			$mergeIt = matchTag($baseTree->{Kids}, $extraChild, $mergeTags->{$extraChildTag});
+		}
+
+		if ($mergeIt)
+		{
+			# Merge children
+			mergeTwoTrees($mergeIt, $extraChild, $mergeTags);
+		}
+		else
+		{
+			# Add this child
+			push @{$baseTree->{Kids}}, $extraChild;
+		}
+	}
+}
+
+sub matchTag
+{
+	my $peers = shift;
+	my $outsider = shift;
+	my $attr = shift;
+
+	foreach my $peer (@$peers)
+	{
+		if (ref $peer eq ref $outsider && (!defined $attr || $peer->{$attr} eq $outsider->{$attr}))
+		{
+			return $peer;
+		}
+	}
+	
+	return undef;
+}
+
+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
+		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 ">";
+}
+
+
--- a/sf-package/build.xml	Wed Oct 07 11:09:46 2009 +0100
+++ b/sf-package/build.xml	Wed Oct 07 11:12:20 2009 +0100
@@ -3,6 +3,9 @@
   <!-- location of this config -->
   <dirname property="sf.package.config.dir" file="${ant.file.SF-PACKAGE-CONFIG}"/>
   
+  <!-- import codeline-specific properties -->
+  <import file="${sf.package.config.dir}/${sf.spec.job.codeline}_props.ant.xml" optional="yes"/>
+  
   <!-- import package properties -->
   <import file="${sf.package.config.dir}/package_props.ant.xml" />
   
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sf-package/symbian2_props.ant.xml	Wed Oct 07 11:12:20 2009 +0100
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+
+<project name="SYMBIAN2-PROPS">
+  <property name="sf.spec.baseline.location" value="\\bishare\Releases\PDK_2.0.e"/>
+</project>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sf-package/symbian3_props.ant.xml	Wed Oct 07 11:12:20 2009 +0100
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+
+<project name="SYMBIAN3-PROPS">
+  <property name="sf.spec.baseline.location" value="\\bishare\Releases\PDK_3.0.a"/>
+</project>
+
--- a/sf-platform/build.xml	Wed Oct 07 11:09:46 2009 +0100
+++ b/sf-platform/build.xml	Wed Oct 07 11:12:20 2009 +0100
@@ -41,7 +41,7 @@
     <copy file="${build.drive}/${sf.spec.bldmefirst.gt.variant}" tofile="${build.drive}/epoc32/tools/variant/variant.cfg" failonerror="true" verbose="true" preservelastmodified="true" />
 	<if><isset property="sf.spec.bldmefirst.gt.hrh.os"/>
 	 <then>
-	  <copy file="${build.drive}/${sf.spec.bldmefirst.gt.hrh.os}" tofile="${build.drive}/epoc32/tools/variant/Symbian_OS.hrh" failonerror="false" overwrite="true" verbose="true" preservelastmodified="true" />
+	  <copy file="${build.drive}/${sf.spec.bldmefirst.gt.hrh.os}" tofile="${build.drive}/epoc32/include/variant/Symbian_OS.hrh" failonerror="false" overwrite="true" verbose="true" preservelastmodified="true" />
 	 </then>
 	</if>
   </target>