Merge ats_specialise_drop to insert ROM image parameters.
authorPat Downey <patd@symbian.org>
Wed, 12 May 2010 12:31:35 +0100
changeset 1026 9983d8eb2250
parent 991 f2c5bb4624be (diff)
parent 957 9a43fe34cdb4 (current diff)
child 1027 8f26271e902e
Merge ats_specialise_drop to insert ROM image parameters.
common/build.postbuild.xml
--- a/common/build.postbuild.xml	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/build.postbuild.xml	Wed May 12 12:31:35 2010 +0100
@@ -79,7 +79,9 @@
 
         <!-- copy log files linked to the generation of roms for REE -->
         <runtarget target="sf-copy-rom-logs"/>
-
+		
+		<runtarget target="sf-merge-brag"/>
+		
         <!-- Zip up all the logs -->
         <runtarget target="sf-zip-logs"/>
         
@@ -241,6 +243,7 @@
                     <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
                     <arg value="-x@${sf.epoc32.exclusions.file}"/>
                     <arg value="-x!epoc32\gcc"/>
+                    <arg value="-x!epoc32\gcc_mingw"/>
                     <arg value="-x!epoc32\tools"/>
                     <arg value="-x!epoc32\build"/>
                     <arg value="-x!epoc32\release\armv5"/>
@@ -354,6 +357,7 @@
             <arg value="${build.drive}/output/zips/release/tools_epoc.zip"/> 
             <arg value="epoc32/tools"/>
             <arg value="epoc32/gcc"/>
+            <arg value="epoc32/gcc_mingw"/>
         </exec>
         <antcall target="sf-zip-content">
             <param name="zip.config.file" value="${temp.build.dir}/zip.cfg.xml.ftl"/>
@@ -567,8 +571,8 @@
 		    <arg value="${build.log.dir}/linksForDiamonds.xml"/>
 	  </exec>
     </target>
-
-    <target name="sf-brag-to-diamonds">
+	
+	<target name="sf-merge-brag">
         <!-- Merge all our bits of XML together -->
         <exec executable="perl" output="${build.log.dir}/summary/_BRAG.xml" logError="true">
             <arg value="${sf.common.config.dir}/tools/mergeXML.pl"/>
@@ -576,6 +580,9 @@
             <arg value="--merge=buildStatus,phase(name),step(name),failures(level)"/>
             <arg value="${build.log.dir}/summary/*?_BRAG.xml"/>
         </exec>
+	</target>
+	
+    <target name="sf-brag-to-diamonds">
         <!-- 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"/>
@@ -628,13 +635,18 @@
     <target name="sf-compare-to-baseline" depends="sf-diamondize-bom,sf-check-utilities-dir" if="sf-utilities-available">
         <property name="sf.releasenotes.wiki.txt" value="${build.log.dir}/releaseNotes.wiki.txt"/>
         <delete file="${sf.releasenotes.wiki.txt}"/>
+        <!-- FCL Usage and Changesets -->
+        <exec executable="perl" dir="${build.drive}" output="${sf.releasenotes.wiki.txt}">
+            <arg value="${build.drive}/utilities/releaseAutomation/releaseNotes.pl"/>
+            <arg value="${build.log.dir}/BOM/sources.csv"/>
+        </exec>
         <!-- Package Comparison and FCL Usage -->
-        <exec executable="perl" dir="${sf.spec.sourcesync.sourcespecdir}" output="${sf.releasenotes.wiki.txt}">
+        <exec executable="perl" dir="${sf.spec.sourcesync.sourcespecdir}" output="${sf.releasenotes.wiki.txt}" append="true">
             <arg value="${build.drive}/utilities/releaseAutomation/packageComparison.pl"/>
             <arg value="--sources=${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
-	    <arg value="--sysdef=${sf.spec.sourcesync.sourcespecdir}/sysdefs/system_model.xml"/>
-	    <arg value="--sysdef=${sf.spec.sourcesync.sourcespecdir}/sysdefs/system_model_os.xml"/>
-	    <arg value="--sysdef=${sf.spec.sourcesync.sourcespecdir}/sysdefs/system_model_s60.xml"/>
+            <arg value="--sysdef=${sf.spec.sourcesync.sourcespecdir}/sysdefs/system_model.xml"/>
+            <arg value="--sysdef=${sf.spec.sourcesync.sourcespecdir}/sysdefs/system_model_os.xml"/>
+            <arg value="--sysdef=${sf.spec.sourcesync.sourcespecdir}/sysdefs/system_model_s60.xml"/>
             <arg value="--baseline=${sf.previous.pdk.tag}"/>
         </exec>
         <!-- Mercurial comparison -->
@@ -844,6 +856,7 @@
                 <runtarget target="sf-package-validate"/>
             </then>
         </if>
+		<runtarget target="sf-merge-brag"/>
         <runtarget target="sf-zip-logs"/>
                 
         <if>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/build.retry.xml	Wed May 12 12:31:35 2010 +0100
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<project name="SF-RETRY" default="all" xmlns:hlm="http://www.nokia.com/helium">
+
+    <dirname property="sf.retry.dir" file="${ant.file.SF-RETRY}"/>
+
+    <macrodef name="retry">
+        <attribute name="tries" default="3" description="How many times to try the nested script"/>
+        <attribute name="uniquename" description="An identifier specific to this thread, or a constant for single-threaded contexts"/>
+        <attribute name="failonerror" default="true" description="Set to false to avoid an abort after all attempts"/>
+        <element name="sequential" description="The tasks to retry"/>
+        <element name="cleanup" optional="true" description="Tasks to run to clean up after a failed try"/>
+        <sequential>
+            <trycatch reference="exception.@{uniquename}.ref" property="exception.@{uniquename}.prop">
+                <try>
+                    <sequential/>
+                </try>
+                <catch>
+                    <math result="newtries.@{uniquename}" operation="-" operand2="@{tries}" operand1="1" datatype="int"/>
+                    <if>
+                        <not>
+                            <equals arg1="${newtries.@{uniquename}}" arg2="0"/>
+                        </not>
+                        <then>
+                            <!-- Clean up ready to try again -->
+                            <cleanup/>
+                            <sleep seconds="1"/>
+                            <!-- Recurse (via helper) -->
+                            <retry-helper tries="${newtries.@{uniquename}}" uniquename="@{uniquename}" failonerror="@{failonerror}">
+                                <sequence>
+                                    <sequential/>
+                                </sequence>
+                                <cleanup-helper>
+                                    <cleanup/>
+                                </cleanup-helper>
+                            </retry-helper>
+                        </then>
+                        <else>
+                            <if>
+                                <istrue value="@{failonerror}"/>
+                                <then>
+                                    <throw refid="exception.@{uniquename}.ref"/>
+                                </then>
+                            </if>
+                        </else>
+                    </if>
+                </catch>
+            </trycatch>
+        </sequential>
+    </macrodef>
+    <macrodef name="retry-helper" description="Don't use this directly, use 'retry'">
+        <attribute name="tries"/>
+        <attribute name="uniquename"/>
+        <attribute name="failonerror"/>
+        <element name="sequence"/>
+        <element name="cleanup-helper"/>
+        <sequential>
+            <retry tries="@{tries}" uniquename="@{uniquename}" failonerror="@{failonerror}">
+                <sequential>
+                    <sequence/>
+                </sequential>
+                <cleanup>
+                    <cleanup-helper/>
+                </cleanup>
+            </retry>
+        </sequential>
+    </macrodef>
+
+</project>
--- a/common/build.test.xml	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/build.test.xml	Wed May 12 12:31:35 2010 +0100
@@ -150,6 +150,7 @@
         <echo message="INFO Creating smoketest testpackage"/>
         <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"/>
+            <arg value="--target=${sf.spec.test.target}"/>
         </exec>
         <copy file="${build.drive}/smoketest/group/smoketest.zip" todir="${sf.spec.test.package.location}"  failonerror="false"/>
         
@@ -170,6 +171,12 @@
 	<!-- Sending testdrop to ATS3 -->
 	
     <target name="sf-send-testpkg" depends="sf-start-ats,sf-find-ATS-worker-root,sf-make-junction">
+        <if><equals arg1="${sf.spec.test.target}" arg2="syborg"/>
+          <then>
+            <delete file="${sf.spec.test.workerroot}/syborg.dtb" quiet="true"/>
+            <copy file="${build.drive}/epoc32/rom/syborg/syborg.dtb" todir="${sf.spec.test.workerroot}" failonerror="false"/>
+          </then>
+        </if>
         <mkdir dir="${sf.spec.test.workerroot}/${sf.spec.test.package.droppath}"/>
         <echo message="Sending test package ${sf.spec.test.package.name} to ${sf.spec.test.host.name} path ${sf.spec.test.host.droppath}"/>
         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_testdrop.log">
@@ -182,9 +189,13 @@
             <arg value="--host-drop-path=${sf.spec.test.host.droppath}"/>
         </exec>
     </target>
-	<target name="sf-start-ats">        			
-	    <exec executable="${ats.drive}/start.cmd" dir="${ats.drive}" failonerror="false" spawn="true" vmlauncher="false" />
-		<echo message="Waiting for 10 seconds to start the ATS Worker......."/>
-		<sleep seconds="10"/>
+    
+	<target name="sf-start-ats">
+    <if><available file="${ats.drive}/start.cmd"/>        
+    <then>
+        <exec executable="start.cmd" dir="${ats.drive}" spawn="true" failonerror="false"/>
+        <echo message="Waiting for 10 seconds to start the ATS Worker......."/>
+        <sleep seconds="10"/>
+    </then>
     </target> 
 </project>
--- a/common/build.xml	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/build.xml	Wed May 12 12:31:35 2010 +0100
@@ -60,7 +60,8 @@
     <property name="ccm.user.password" value="set_to_any_value_to_skip_scm_checks__for_helium_5"/>
     <property name="ats.drive" value="${sf.spec.ats_worker.drive}"/>
     <property name="skip.sbs.layer.generation" value="true"/> <!-- helium 7: needs to be predefined before hlm import -->
-
+    <property name="qt.qmake.ant.template" value="${sf.common.config.dir}/templates/run-qmake.ant.xml.ftl"/> <!-- override helium default to use our own template -->
+    
     <!-- override helium 7 defaults to operate like helium 5.
        *.log.dir props dont exist yet so need to be set now, otherwise they 
        become immutable after helium.ant.xml import -->
@@ -114,6 +115,11 @@
           <hlm:signalInput id="raptorErrorSignalInput" failbuild="never">
             <hlm:notifierListRef refid="defaultFailNotifier" />
           </hlm:signalInput>
+
+          <hlm:signalInput id="signalRunQMakeInput" failbuild="never">
+            <hlm:notifierListRef refid="defaultFailNotifier" />
+          </hlm:signalInput>
+
       </then>
     </if>
     
--- a/common/common_props.ant.xml	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/common_props.ant.xml	Wed May 12 12:31:35 2010 +0100
@@ -101,6 +101,7 @@
     <property name="sf.spec.test.host.password"  value="admin"/>
     <property name="sf.spec.test.host.droppath"  value="D:\ats3_testdrop_arrivals\${env.COMPUTERNAME}"/>
     <property name="sf.spec.test.epocroot"       value="winscw_smoketest"/>
+	<property name="sf.spec.test.target"         value="winscw"/> <!-- This specifies the target on which tests will be run -->
 
     <!-- ATS properties -->
     <property name="sf.spec.test.package.location"  value="\\${sf.spec.test.host.name}\ats3_testdrop_arrivals\${env.COMPUTERNAME}"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/templates/run-qmake.ant.xml.ftl	Wed May 12 12:31:35 2010 +0100
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<project name="run-qmake-${ant['sysdef.configuration']}" default="all">
+
+    <target name="all">
+        <parallel threadCount="${r'$'}{number.of.threads}">
+    <#list data["//unit/@proFile/.."] as unit>
+            <sequential>
+                <echo>Running qmake for ${unit.@bldFile}/${unit.@proFile}</echo>
+                <if>
+                    <available file="${r'$'}{build.drive}/${unit.@bldFile}" type="dir"/>
+                    <then>
+                        <exec executable="cmd" dir="${r'$'}{build.drive}/${unit.@bldFile}" failonerror="false">
+                            <arg value="/C"/>
+                            <arg value="qmake"/>
+                            <!-- arg value="-listgen"/ -->
+                            <#if unit.@qmakeArgs[0]??>
+                            <arg line="${unit.@qmakeArgs?xml}"/>
+                            <#else>
+                            <arg line="${ant['qt.qmake.default.args']?xml}"/>
+                            </#if>
+                            <arg value="${unit.@proFile?xml}"/>
+                        </exec>
+                    </then>
+                    <else>
+                       <echo message="ERROR: Directory ${r'$'}{build.drive}/${unit.@bldFile} doesn't exist."/>
+                    </else>
+                </if>
+            </sequential>
+    </#list>
+        </parallel>
+    </target>
+    
+</project>
--- a/common/templates/source-spec.ant.xml.ftl	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/templates/source-spec.ant.xml.ftl	Wed May 12 12:31:35 2010 +0100
@@ -3,6 +3,8 @@
 
 <#assign dollar = "$"/>
 
+    <import file="${dollar}{sf.common.config.dir}/build.retry.xml"/>
+
     <!-- Convert \s in cache location, because otherwise they disappear entirely when used in a regex replacement! -->
     <propertyregex property="sf.spec.sourcesync.cachelocation.for.regex" input="${dollar}{sf.spec.sourcesync.cachelocation}" regexp="\\" replace="/" global="true" defaultValue="${dollar}{sf.spec.sourcesync.cachelocation}"/>
 
@@ -30,14 +32,20 @@
         </if>
         
         <!-- Convert source tag/branch to to changeset hash, in case it's a local tag on the server -->
-        <exec executable="hg" outputproperty="sf.sourcesync.${count}.checksum">
-            <arg value="id"/>
-            <arg value="${pkg_detail.source}"/>
-            <arg value="-r"/>
-            <arg value="${pkg_detail.pattern}"/>
-            <arg value="-q"/>
-        </exec>
-        
+        <retry tries="10" uniquename="${count}">
+            <sequential>
+                <exec executable="hg" failonerror="true" output="${ant['temp.build.dir']}/sf.sourcesync.${count}.checksum" error="nul:">
+                    <arg value="id"/>
+                    <arg value="${pkg_detail.source}"/>
+                    <arg value="-r"/>
+                    <arg value="${pkg_detail.pattern}"/>
+                    <arg value="-q"/>
+                </exec>
+                <loadfile property="sf.sourcesync.${count}.checksum" srcFile="${ant['temp.build.dir']}/sf.sourcesync.${count}.checksum"/>
+                <propertyregex property="sf.sourcesync.${count}.checksum" override="true" input="${dollar}{sf.sourcesync.${count}.checksum}" regexp="(\S{12})" select="\1"/>
+            </sequential>
+        </retry>
+
         <if>
             <and>
                 <isset property="sf.spec.sourcesync.cachelocation.${count}"/>
@@ -45,13 +53,18 @@
             </and>
             <then>
                 <!-- Package in cache already -->
-                <echo message="Pull from ${pkg_detail.source} to ${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
-                <exec executable="hg" dir="${dollar}{sf.spec.sourcesync.cachelocation.${count}}" failonerror="false" resultproperty="sf.spec.sourcesync.cache.pull.error.code.${count}">
-                    <arg value="pull"/>
-                    <arg value="${pkg_detail.source}"/>
-                </exec>
+                <retry tries="3" uniquename="${count}" failonerror="0">
+                    <sequential>
+                        <echo message="Pull from ${pkg_detail.source} to ${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
+                        <exec executable="hg" dir="${dollar}{sf.spec.sourcesync.cachelocation.${count}}" failonerror="true">
+                            <arg value="pull"/>
+                            <arg value="${pkg_detail.source}"/>
+                        </exec>
+                        <property name="sf.spec.sourcesync.cache.pull.succeeded.${count}" value="1"/>
+                    </sequential>
+                </retry>
                 <if>
-                    <equals arg1="0" arg2="${dollar}{sf.spec.sourcesync.cache.pull.error.code.${count}}"/>
+                    <isset property="sf.spec.sourcesync.cache.pull.succeeded.${count}"/>
                     <then>
                         <echo message="Clone from ${dollar}{sf.spec.sourcesync.cachelocation.${count}} to ${ant['build.drive']}${pkg_detail.dst}"/>
                         <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
@@ -78,13 +91,20 @@
                             </if>
                         </forget>
                         <!-- In the meantime, by-pass it for this build -->
-                        <echo message="Clone from ${pkg_detail.source} to ${ant['build.drive']}${pkg_detail.dst}"/>
-                        <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
-                            <arg value="clone"/>
-                            <arg value="-U"/>
-                            <arg value="${pkg_detail.source}"/>
-                            <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
-                        </exec>
+                        <retry tries="30" uniquename="${count}">
+                            <sequential>
+                                <echo message="Clone from ${pkg_detail.source} to ${ant['build.drive']}${pkg_detail.dst}"/>
+                                <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
+                                    <arg value="clone"/>
+                                    <arg value="-U"/>
+                                    <arg value="${pkg_detail.source}"/>
+                                    <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
+                                </exec>
+                            </sequential>
+                            <cleanup>
+                                <delete dir="${ant['build.drive']}${pkg_detail.dst}"/>
+                            </cleanup>
+                        </retry>
                     </else>
                 </if>
                 <!-- Update to required revision -->
@@ -95,13 +115,21 @@
                 </exec>
             </then>
             <else>
-                <echo message="Clone from ${pkg_detail.source} to ${ant['build.drive']}${pkg_detail.dst}"/>
-                <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
-                    <arg value="clone"/>
-                    <arg value="-U"/>
-                    <arg value="${pkg_detail.source}"/>
-                    <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
-                </exec>
+                <!-- Package not in cache, or cache not in use -->
+                <retry tries="10" uniquename="${count}">
+                    <sequential>
+                        <echo message="Clone from ${pkg_detail.source} to ${ant['build.drive']}${pkg_detail.dst}"/>
+                        <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
+                            <arg value="clone"/>
+                            <arg value="-U"/>
+                            <arg value="${pkg_detail.source}"/>
+                            <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
+                        </exec>
+                    </sequential>
+                    <cleanup>
+                        <delete dir="${ant['build.drive']}${pkg_detail.dst}"/>
+                    </cleanup>
+                </retry>
                 <!-- Update to required version -->
                 <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="true">
                     <arg value="update"/>
--- a/common/templates/zip.cfg.xml.ftl.template	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/templates/zip.cfg.xml.ftl.template	Wed May 12 12:31:35 2010 +0100
@@ -117,6 +117,18 @@
 				<set name="name" value="binaries_epoc_sdk"/>
 			</config>
 		</config>
+
+                <!-- For packaging tools builds such as "overlay", identified by sf.spec.job.name -->
+		<config name="bin-${sf.spec.job.name}-metadata" abstract="true">
+			<set name="archives.dir" value="${build.output.dir}/zips/release" />
+			<set name="grace.filters" value="emu"/>
+			<set name="include" value="*"/>
+			<set name="exclude" value="**"/>
+			<config name="${sf.spec.job.name}">
+				<set name="name" value="binaries_${sf.spec.job.name}"/>
+			</config>
+		</config>
+
 		<!-- "Null" info entries, which match no files, but do populate the release_metadata.xml -->
 		<config name="info-just-metadata" abstract="true">
 			<set name="archives.dir" value="${build.output.dir}/zips/release" />
--- a/common/tools/ats/ats_specialise_test_drop.pl	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/tools/ats/ats_specialise_test_drop.pl	Wed May 12 12:31:35 2010 +0100
@@ -40,6 +40,8 @@
 my $temp_dest_name; # Leafname of temporary output file, if $destfile undefined.
 my $publish;	# Publishing folder for ats reports.
 my $bld_drive;  # Subst'd drive
+my $test_target; # The target which the tests will be run on
+my $image_path; # The path to the ROM image used for testing (not valid for WINSCW target)
 
 sub usage($);
 sub help();
@@ -47,13 +49,15 @@
 sub silent_command($);
 
 my %optmap = (  'test-drop-name' => \$test_drop_name,
-			    'host-name' => \$host_name,
-			    'build-id' => \$build_id,
-			    'src' => \$srcfile,
-			    'dest' => \$destfile,
+                'host-name' => \$host_name,
+                'build-id' => \$build_id,
+                'src' => \$srcfile,
+                'dest' => \$destfile,
                 'help' => \$help,
                 'publish' => \$publish,
-				'bld-drive' => \$bld_drive);
+                'bld-drive' => \$bld_drive,
+                'test-target' => \$test_target,
+                'image-path' => \$image_path);
 
 GetOptions(\%optmap,
           'test-drop-name=s',
@@ -63,7 +67,9 @@
           'dest=s',
           'help!',
           'publish=s', 
-		  'bld-drive=s') 
+          'bld-drive=s',
+          'test-target=s',
+          'image-path=s') 
           or usage_error();
 
 # Check if Tie::File module installed
@@ -126,13 +132,20 @@
 
 # Parse the input XML into hashref.
 my $test_drop = XMLin("./$xml_in", keeproot => 1,
-    forcearray => [ 'name', 'id','owner','priority','buildid','postAction','type','target','device', 'property', 'command', 'param'],#
+    forcearray => [ 'name', 'id', 'owner', 'priority', 'buildid', 'postAction', 'type', 'target', 'device', 'property', 'command', 'param', 'plan'],#
         keyattr => [] );
     
 # Insert the specified test drop name, if any.
 $test_drop->{'test'}->{'name'}->[0] = $test_drop_name, if $test_drop_name;
 # Insert the specified build id, if any.
 $test_drop->{'test'}->{'buildid'}->[0] = $build_id, if $build_id;
+# Insert the path to the ROM image
+if ($image_path) {
+	$test_drop->{'test'}->{'plan'}->[0]->{'flash'}->[0];
+	my $flash_params = $test_drop->{'test'}->{'plan'}->[0]->{'flash'};
+    $flash_params->[0] = { 'target-alias' => $test_target, 'images' => $image_path };
+}
+
 # Insert the FileStoreAction parameter
 my $postaction_params = $test_drop->{'test'}->{'postAction'}->[0]->{'params'}->{'param'}, if $publish;
 $postaction_params->[1] = { 'name' => "to-folder", 'value' => $publish }, if $publish;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/ats/devices/c100782/EMULATOR_ATSINTERFACE_c100782.properties	Wed May 12 12:31:35 2010 +0100
@@ -0,0 +1,24 @@
+
+NAME=EMULATOR on c100782
+
+CATEGORY=hardware
+
+TYPE=WINSCW
+
+CONNECTION=emulator
+
+TEMPDIR=G:\\ats3
+
+CLASS=RTestableDevice
+
+HARNESS=ATSINTERFACE
+
+#reinstall files after reboot
+REINSTALL=false
+
+PLATFORM=WINSCW
+BUILD=udeb
+
+IMAGE=winscw_smoketest
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/ats/devices/c100782/EMULATOR_GENERIC_c100782.properties	Wed May 12 12:31:35 2010 +0100
@@ -0,0 +1,24 @@
+
+NAME=EMULATOR on c100782
+
+CATEGORY=hardware
+
+TYPE=WINSCW
+
+CONNECTION=emulator
+
+TEMPDIR=G:\\ats3
+
+CLASS=GenericTestableDevice
+
+HARNESS=GENERIC
+
+#reinstall files after reboot
+REINSTALL=false
+
+PLATFORM=WINSCW
+BUILD=udeb
+
+IMAGE=winscw_smoketest
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/ats/devices/c100782/SYBORG_ATSINTERFACE_c100782.properties	Wed May 12 12:31:35 2010 +0100
@@ -0,0 +1,30 @@
+
+NAME=SYBORG on c100782
+
+CATEGORY=hardware
+
+TYPE=Syborg
+
+CONNECTION=HTI
+
+TEMPDIR=G:\\ats3
+
+CLASS=RTestableDevice
+
+HARNESS=ATSINTERFACE
+
+FLASHER=syborgflasher
+
+FLASHING_ENABLED=true
+
+BOOT_TIME = 90
+
+#reinstall files after reboot
+REINSTALL=false
+
+PLATFORM=armv5
+BUILD=urel
+
+# comms settings
+DGW_PORT=3336
+DGW_COMPORT=COM6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/ats/devices/c100782/SYBORG_GENERIC_c100782.properties	Wed May 12 12:31:35 2010 +0100
@@ -0,0 +1,30 @@
+
+NAME=SYBORG on c100782
+
+CATEGORY=hardware
+
+TYPE=Syborg
+
+CONNECTION=HTI
+
+TEMPDIR=G:\\ats3
+
+CLASS=GenericTestableDevice
+
+HARNESS=GENERIC
+
+FLASHER=syborgflasher
+
+FLASHING_ENABLED=true
+
+BOOT_TIME = 90
+
+#reinstall files after reboot
+REINSTALL=false
+
+PLATFORM=armv5
+BUILD=urel
+
+# comms settings
+DGW_PORT=3337
+DGW_COMPORT=COM6
--- a/common/tools/brag/brag.xsl	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/tools/brag/brag.xsl	Wed May 12 12:31:35 2010 +0100
@@ -21,10 +21,9 @@
 	<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="$unknownCount != 0">RED</xsl:when>
-		<xsl:when test="$minorCount != 0">AMBER</xsl:when>
+		<xsl:when test="$criticalCount != 0">RED</xsl:when>
+		<xsl:when test="$majorCount != 0">AMBER</xsl:when>
+		<xsl:when test="$unknownCount != 0">AMBER</xsl:when>
 		<xsl:otherwise>GREEN</xsl:otherwise>
 	</xsl:choose>
 	</h2>
--- a/common/tools/brag/bragForDiamonds.xsl	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/tools/brag/bragForDiamonds.xsl	Wed May 12 12:31:35 2010 +0100
@@ -12,10 +12,9 @@
 	<build>
 	<status>
 	<xsl:choose>
-		<xsl:when test="$criticalCount != 0">Black</xsl:when>
-		<xsl:when test="$majorCount != 0">Red</xsl:when>
-		<xsl:when test="$unknownCount != 0">Red</xsl:when>
-		<xsl:when test="$minorCount != 0">Amber</xsl:when>
+		<xsl:when test="$criticalCount != 0">Red</xsl:when>
+		<xsl:when test="$majorCount != 0">Amber</xsl:when>
+		<xsl:when test="$unknownCount != 0">Amber</xsl:when>
 		<xsl:otherwise>Green</xsl:otherwise>
 	</xsl:choose>
 	</status>
--- a/common/tools/brag/uh2brag.pl	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/tools/brag/uh2brag.pl	Wed May 12 12:31:35 2010 +0100
@@ -43,10 +43,11 @@
 {
 	while (my $line = <INDEX>)
 	{
-		if ($line =~ m{<tr><td><a href='.*'>.*</a></td><td>(\d+)</td><td>(\d+)</td><td>(\d+)</td><td>(\d+)</td>})
+		if ($line =~ m{<tr><td><a href='.*'>.*</a></td><td>(\d+)</td><td>(\d+)</td><td>(\d+)</td><td>(\d+)</td>(<td>(\d+)</td>)?})
 		{
 			$criticals += $1 if ($1);
 			$majors += $2 if ($2);
+			$majors += $6 if ($6); # add number of missing files to majors
 			$minors += $3 if ($3);
 			$unknowns += $4 if ($4);
 		}
--- a/common/tools/csvToSysDef.pl	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/tools/csvToSysDef.pl	Wed May 12 12:31:35 2010 +0100
@@ -153,7 +153,14 @@
 	$tagName =~ s{^main::}{};
 	if ($tagName eq "Characters")
 	{
-		print $tree->{Text};
+		if ($tree->{Text} =~ m{[<>&]})
+		{
+			print "<![CDATA[$tree->{Text}]]>";
+		}
+		else
+		{
+			print $tree->{Text};
+		}
 		return;
 	}
 	
@@ -161,7 +168,7 @@
 
 	foreach my $attr (
 		sort {
-			my $order = "name long-name tech_domain level span schema levels filter introduced deprecated purpose class plugin origin-model bldFile mrp version priority";
+			my $order = "name long-name tech_domain level span schema levels filter introduced deprecated purpose class plugin origin-model bldFile proFile qmakeArgs mrp version priority";
 			my $ixA = index $order, $a;
 			my $ixB = index $order, $b;
 			die "$a $b" if $ixA + $ixB == -2;
@@ -172,7 +179,11 @@
 		}
 		keys %$tree)
 	{
-		print " $attr=\"$tree->{$attr}\"";
+		my $value_escaped = $tree->{$attr};
+		$value_escaped =~ s/&/&amp;/g;
+		$value_escaped =~ s/</&lt;/g;
+		$value_escaped =~ s/>/&gt;/g;
+		print " $attr=\"$value_escaped\"";
 	}
 
 	my $children = $tree->{Kids};
--- a/common/tools/lib/XML/Printer.pm	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/tools/lib/XML/Printer.pm	Wed May 12 12:31:35 2010 +0100
@@ -55,7 +55,11 @@
 		}
 		keys %$tree)
 	{
-		print " $attr=\"$tree->{$attr}\"";
+		my $value_escaped = $tree->{$attr};
+		$value_escaped =~ s/&/&amp;/g;
+		$value_escaped =~ s/</&lt;/g;
+		$value_escaped =~ s/>/&gt;/g;
+		print " $attr=\"$value_escaped\"";
 	}
 
 	my $children = $tree->{Kids} || [];
--- a/common/tools/listdir.py	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/tools/listdir.py	Wed May 12 12:31:35 2010 +0100
@@ -26,9 +26,9 @@
   if(len(sys.argv)>2):
     x_dirs = string.lower(sys.argv[2])
     exclude_dirs = re.split(',', x_dirs)
-  scandir(directory, exclude_dirs)
+  scandir(directory, exclude_dirs,directory)
 
-def scandir(top, exclude_dirs):
+def scandir(top, exclude_dirs,directory):
     fixpath = re.compile('\\\\')    
     fixroot = re.compile('^%s\\\\' % top)
     for root, dirs, files in os.walk(top, topdown=True):
@@ -38,6 +38,6 @@
         for name in files:
             filename = os.path.join(root, name)
             fn = string.lower(fixpath.sub('/',fixroot.sub('',filename)))
-            print fn
+            print fn.strip(directory)
 
 main()
--- a/common/tools/populateziptemplate.pl	Wed Mar 31 11:13:39 2010 +0100
+++ b/common/tools/populateziptemplate.pl	Wed May 12 12:31:35 2010 +0100
@@ -72,15 +72,21 @@
 {
 	warn "Warning: Package $package->{dst} does not appear on the local system\n" unless -d $package->{dst};
 	$package->{dst} =~ s{^/}{}g;
-	if ($package->{source} =~ m{/(sfl|oss)/(MCL|FCL)/(sf|sftools|interim)/(([^/]+)/)?([^/]+)?})
+	if ($package->{source} =~ m{/(sfl|oss)/(MCL|FCL)/(sf|utilities|sftools|interim)/(([^/]+)/)?([^/]+)?})
 	{
 		my ($license, $codeline, $thingy, $layer, $packageName) = ($1, $2, $3, $5, $6);
 		# $thingy is the part of the path after the codeline. For
 		# platform packages, it's "sf". For the utilities package, it's
-		# "sftools".
+		# "sftools", or "utilities, depending on the URL used to
+		# obtain it.
 		#
 		# I can't think of anything to describe this item, hence $thingy
-		if ($thingy eq "sftools")
+		if ($thingy eq "utilities")
+		{
+			$layer = "tools";
+			$packageName = "utilities";
+		}
+		elsif ($thingy eq "sftools")
 		{
 			$layer = "tools";
 		}
--- a/sf-package/package_props.ant.xml	Wed Mar 31 11:13:39 2010 +0100
+++ b/sf-package/package_props.ant.xml	Wed May 12 12:31:35 2010 +0100
@@ -31,5 +31,8 @@
   
   <property name="sf.spec.smoketest.enable" value="false"/> <!-- This disables publishing Smoke Test Report -->
 
+  <!-- Enable qmake processing for any units with proFile attributes -->
+  <property name="qmake.enabled" value="true"/>
+
 </project>
 
--- a/sf-platform/compile.ant.xml	Wed Mar 31 11:13:39 2010 +0100
+++ b/sf-platform/compile.ant.xml	Wed May 12 12:31:35 2010 +0100
@@ -39,6 +39,7 @@
         <!-- sf.spec.sbs.tools.config param used. do-target-build will decide to build sequentially/together -->
         <antcall target="sf-do-target-compile" inheritAll="false" inheritRefs="true">
             <param name="i.sf.spec.sbs.config" value="${sf.spec.sbs.tools.config}" />           
+            <param name="qmake.enabled"        value="false"/> <!-- ensure qmake is not run, before its available -->
         </antcall>
       </then>
       <else>
@@ -73,6 +74,7 @@
     <antcall target="compile-main" inheritAll="false" inheritRefs="true">
         <param name="build.system" value="${sf.spec.build.system}" />
         <param name="sbs.inputs.list" value="sf.export"/>
+        <param name="qmake.enabled"   value="false"/> <!-- ensure qmake is not run, before its available -->
     </antcall> 
   </target>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sf-tools/build.xml	Wed May 12 12:31:35 2010 +0100
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="SF-TOOLS-CONFIG" xmlns:hlm="http://www.nokia.com/helium">
+  <!-- location of this config -->
+  <dirname property="sf.tools.config.dir" file="${ant.file.SF-TOOLS-CONFIG}"/>
+
+  <!-- import package properties -->
+  <import file="${sf.tools.config.dir}/tools_props.ant.xml" optional="true"/>
+  
+  <!-- import common properties/targets/references -->
+  <import file="../common/build.xml" />
+  
+  <!-- import package references -->
+  <import file="${sf.tools.config.dir}/tools_refs.ant.xml"  optional="true"/>
+  
+    <!-- Support Helium 7+ only for Tools build -->
+    <if>
+        <or>
+          <equals arg1="${helium.version}" arg2="5.0"/>
+          <equals arg1="${last.major.helium.version}" arg2="5.0"/>
+        </or>
+        <then>
+            <fail>INFO Tools build requires minimum of Helium 7.0</fail>
+        </then>
+    </if>
+    
+  <target name="sf-build-noprep" depends="sf-platform-bootstrap-gt,sf-compile,sf-postbuild">
+    <echo>[SF-BUILD-NOPREP] INFO:(tools)</echo>
+    <echo>[SF-BUILD-NOPREP] WARNING: Not generating model from packages</echo>
+  </target>
+    
+    <target name="sf-platform-bootstrap-gt" >
+    <echo>INFO: Bootstrap files required by SBSv2</echo>
+    <!-- do initial stuff to get raptor working -->
+    <copy todir="${build.drive}/epoc32/include/variant/" failonerror="true" verbose="true">
+        <fileset dir="${build.drive}/${sf.spec.bldmefirst.gt.hrh}" includes="*.hrh"/>
+    </copy>
+    <copy file="${build.drive}/${sf.spec.bldmefirst.gt.variant}" tofile="${build.drive}/epoc32/tools/variant/variant.cfg" failonerror="true" verbose="true" overwrite="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/include/variant/Symbian_OS.hrh" failonerror="false" overwrite="true" verbose="true" preservelastmodified="true" />
+    </then>
+    </if>
+    
+    <echo>INFO: Explicit export of files needed for tools build</echo>
+    <exec executable="cmd" dir="${build.drive}" failonerror="false" output="${build.log.dir}/${build.id}_bootstrap_export.log">
+        <arg value="/c sbs.bat EXPORT --export-only -b /sf/os/kernelhwsrv/kernel/eka/bld.inf -b /sf/os/kernelhwsrv/userlibandfileserver/fileserver/group/bld.inf -k -c tools2"/>
+    </exec>
+
+    <echo message="INFO Getting bootstrap environment listing"/>
+    <antcall target="sf-list-dir" inheritAll="false">
+      <param name="sf.dir.location" value="${build.drive}/"/> 
+      <param name="sf.dir.exclude"  value="${build.drive}/epoc32/build"/>     
+      <param name="sf.list.name" value="bootstrap"/>
+    </antcall>    
+  </target>
+  
+  
+  
+  
+ <target name="sf-compile" depends="sf-platform-bootstrap-gt">
+
+   <!-- turn comma separated list into sbs friendly -c list, and _ separated list for friendly log names -->
+   <propertyregex property="i.sf.spec.sbs.config.expanded"         override="true" input="${sf.spec.sbs.config}" regexp="(,)" replace=" -c " defaultValue="${sf.spec.sbs.config}" global="true"  casesensitive="false"/>
+   <propertyregex property="i.sf.spec.sbs.config.expanded.logname" override="true" input="${sf.spec.sbs.config}" regexp="(,)" replace="_"    defaultValue="${sf.spec.sbs.config}" global="true"  casesensitive="false"/>
+   <echo message="INFO Target : ${i.sf.spec.sbs.config.expanded}"/>
+   <echo message="INFO Logname: ${i.sf.spec.sbs.config.expanded.logname} + Config: ${sf.spec.sysdef.configurations.list}"/>
+
+   <!-- define sbs args, log name etc -->
+   <hlm:sbsinput id="sf.build">
+        <sbsOptions>
+            <arg line="-c ${i.sf.spec.sbs.config.expanded}"/>
+            <arg line="-k" />
+            <arg line="-t ${sf.spec.sbs.retry.limit}"/>
+            <arg line="${sf.spec.sbs.options}"/>
+            <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
+            <arg name="--logfile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_compile.log" />
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_${i.sf.spec.sbs.config.expanded.logname}_Makefile" />
+        </sbsOptions>
+   </hlm:sbsinput>
+    
+    <!-- call helium's compile-main target using the sbsInput args defined above -->
+    <echo message="INFO Building target(s): ${i.sf.spec.sbs.config.expanded}"/>
+    <antcall target="compile-main" inheritAll="false" inheritRefs="true">
+      <param name="build.system"               value="${sf.spec.build.system}" />
+      <param name="sysdef.configurations.list" value="${sf.spec.sysdef.configurations.list}" />
+      <param name="sbs.inputs.list"            value="sf.build"/>
+      <reference refid="sf.spec.tools.system.definition.files" torefid="system.definition.files" />
+    </antcall> 
+
+ </target>
+
+ <target name="sf-package-binary">
+
+    <exec executable="7z" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_${sf.spec.job.name}.log">
+        <arg value="a"/>
+        <arg value="-t${sf.spec.package.zip.format}"/>
+        <arg value="-x@${build.log.dir}/listdir_${build.id}_bootstrap.log"/>
+        <arg value="-x!epoc32\build"/>
+        <arg value="-x!sf"/>
+        <arg value="${build.drive}/output/zips/release/binaries_${sf.spec.job.name}.zip"/>
+        <arg value="epoc32\"/>
+    </exec>
+
+    <antcall target="sf-zip-content">
+        <param name="zip.config.file" value="${temp.build.dir}/zip.cfg.xml.ftl"/>
+        <param name="zip.target.name" value="bin-${sf.spec.job.name}-metadata" />
+    </antcall>
+
+ </target>
+ 
+  <target name="create-canonical-sysdef-file">
+     <copy file="${sf.spec.systemdefinition.location}" tofile="${canonical.sysdef.file}" failonerror="true" verbose="true"/>
+  </target>
+
+ <!-- do nothing for these in a tools build -->
+ <target name="sf-run-analysis"/>
+ <target name="sf-copy-rom-logs"/>
+    
+</project>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sf-tools/hlm.bat	Wed May 12 12:31:35 2010 +0100
@@ -0,0 +1,7 @@
+@echo off
+setlocal
+call %~dp0..\common\hlm.bat %*
+endlocal
+
+
+        
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sf-tools/tools_props.ant.xml	Wed May 12 12:31:35 2010 +0100
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<project name="SF-TOOLS-PROPS">
+  
+  <property name="sf.project.type" value="tools" />
+    
+  <property name="sf.drive.space.needed" value="4G"/>
+
+  <property name="sf.spec.bldmefirst.s60.variant" value="western" /> <!-- western|apac|japan -->
+
+  <property name="sf.spec.sourcesync.usecache"     value="true"/>
+
+  <!-- tools build doesnt have a test payload yet -->
+  <property name="sf.spec.test.sendpkg.enable"  value="false"/>
+
+  <property name="sf.spec.md5.enable"      value="false"/>  
+  <property name="sf.spec.publish.enable"  value="false"/> 
+ 
+  <!-- prefilter raptor logs -->
+  <property name="sf.spec.logs.raptorfilter.enable" value="false"/>
+ 
+  <!-- zip all logs before publish -->
+  <property name="sf.spec.logs.zip.enable"  value="true"/>
+
+  <!-- zip all logs before publish -->
+  <property name="sf.spec.logs.zip.enable"  value="true"/> 
+
+</project>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sf-tools/tools_refs.ant.xml	Wed May 12 12:31:35 2010 +0100
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+
+<project name="SF-PLATFORM-REFS">
+
+</project>