Merge
authorShabe Razvi <shaber@symbian.org>
Tue, 16 Feb 2010 17:57:06 +0000
changeset 900 ed28a33746f2
parent 899 d80a65072ed8 (current diff)
parent 886 fc600bbaa15c (diff)
child 901 1bec8957803b
Merge
common/build.xml
sf-package/NewGraphicsArchitecture_props.ant.xml
--- a/common/build.postbuild.xml	Tue Feb 16 17:50:17 2010 +0000
+++ b/common/build.postbuild.xml	Tue Feb 16 17:57:06 2010 +0000
@@ -384,10 +384,10 @@
       
       <!-- Cook the processed raptor logs to produce something in the right format for the BRAG system -->
       <mkdir dir="${build.log.dir}/summary/"/>
-      <exec executable="perl" output="${build.log.dir}/summary/sbs_BRAG.xml" logError="yes" failonerror="false">
+      <!-- exec executable="perl" output="${build.log.dir}/summary/sbs_BRAG.xml" logError="yes" failonerror="false">
         <arg value="${sf.common.config.dir}/tools/brag/sbsToBRAG.pl"/>
         <arg value="${build.log.dir}/analysis/*_compile_preprocessed.log"/>
-      </exec>
+      </exec -->
       
       <echo message="Extracting whatlog information from *whatlog*_compile_preprocessed.log files"/>
       <apply executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_whatlog.log" parallel="true">
@@ -422,10 +422,10 @@
       </for>
 
       <!-- Cook the raptor analysis further to produce something in the right format for the BRAG system -->
-      <exec executable="perl" output="${build.log.dir}/summary/Raptor_BRAG.xml" logError="yes">
-        <arg value="${sf.common.config.dir}/tools/brag/raptorToBRAG.pl"/>
-        <arg value="--raptorsummary"/>
-        <arg value="${build.log.dir}/raptorbits/summary.csv"/>
+      <exec executable="perl" output="${build.log.dir}/summary/Uh_BRAG.xml" logError="yes">
+        <arg value="${sf.common.config.dir}/tools/brag/uh2brag.pl"/>
+        <arg value="--index"/>
+        <arg value="${build.log.dir}/html/index.html"/>
       </exec>
       <!-- And copy the XSL so the output can be transformed by a browser -->
       <copy file="${sf.common.config.dir}/tools/brag/brag.xsl" toDir="${build.log.dir}/summary/"/>
@@ -459,10 +459,10 @@
       
       <!-- Cook the yarp analysis further to produce something in the right format for the BRAG system -->
       <mkdir dir="${build.log.dir}/summary/"/>
-      <exec executable="perl" output="${build.log.dir}/summary/Yarp_BRAG.xml" logError="yes">
+      <!-- exec executable="perl" output="${build.log.dir}/summary/Yarp_BRAG.xml" logError="yes">
         <arg value="${sf.common.config.dir}/tools/brag/yarpToBRAG.pl"/>
         <arg value="${build.log.dir}/analysis/*_yarp.csv"/>
-      </exec>
+      </exec -->
       
       <exec executable="perl" dir="${build.drive}" failonerror="false" outputproperty="sf.job.totalyarperrors">
         <arg value="${sf.common.config.dir}/tools/analysis/parse_yarp_files.pl"/>
--- a/common/build.test.xml	Tue Feb 16 17:50:17 2010 +0000
+++ b/common/build.test.xml	Tue Feb 16 17:57:06 2010 +0000
@@ -82,6 +82,7 @@
                         <arg value="CheckBC.py"/>
                         <arg value="${build.log.dir}/BC/bc.config"/>
                         <arg value="-la"/>
+                        <arg value="-f"/>
                         <arg value="${sf.spec.bccheck.reportid}"/>
                     </exec>
                     <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Libraries_CompatibilityReport_${sf.spec.bccheck.reportid}.xml" tofile="${build.log.dir}/BC/libraries_report.xml" failonerror="false" verbose="true"/>
@@ -94,6 +95,7 @@
                         <arg value="CheckBC.py"/>
                         <arg value="${build.log.dir}/BC/bc.config"/>
                         <arg value="-ha"/>
+                        <arg value="-f"/>
                         <arg value="${sf.spec.bccheck.reportid}"/>
                     </exec>
                     <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Headers_CompatibilityReport_${sf.spec.bccheck.reportid}.xml" tofile="${build.log.dir}/BC/headers_report.xml" failonerror="false" verbose="true"/>
--- a/common/build.xml	Tue Feb 16 17:50:17 2010 +0000
+++ b/common/build.xml	Tue Feb 16 17:57:06 2010 +0000
@@ -130,6 +130,11 @@
     </target>
 
     <target name="sf-check-env">
+    	<!-- Dario's environment dumper -->
+    	<exec executable="perl" dir="${build.drive}">
+            <arg value="${sf.common.config.dir}/tools/envinfo.pl"/>
+        </exec>
+    	
         <!-- Conditional location of BuildEnv.xml. Project always preferred to default -->
         <if><available file="${sf.project.location}/BuildEnv.xml"/>        
             <then>
@@ -149,12 +154,12 @@
             <arg value="--tools='${sf.spec.sbs.tools.config}'"/>
             <arg value="Common"/>
         </exec>
-        <antcall target="sf-log-to-brag">
+        <!-- antcall target="sf-log-to-brag">
             <param name="sf.brag.phase" value="Prebuild"/>
             <param name="sf.brag.step" value="Build Environment Check"/>
             <param name="sf.brag.log" value="${build.log.dir}/BuildEnvironmentCheck.log"/>
             <param name="sf.brag.id" value="BuildEnvironmentCheck"/>
-        </antcall>
+        </antcall -->
         <fail>
             <condition>
                 <not>
@@ -222,7 +227,7 @@
     </target>
 
     <target name="sf-prebuild" depends="sf-prep,sf-prebuild-noprep"/>
-    <target name="sf-prebuild-noprep" depends="sf-prebuild-announce,sf-diamonds-connect,sf-diamonds-tag-build,sf-getenvs,sf-syncsource,sf-diamondize-bom">
+    <target name="sf-prebuild-noprep" depends="sf-prebuild-announce,sf-diamonds-connect,sf-diamonds-envinfo,sf-diamonds-tag-build,sf-getenvs,sf-syncsource,sf-diamondize-bom">
         <stopwatch name="sf-prebuild" action="elapsed"/>
     </target>
     
@@ -242,6 +247,23 @@
         </then>
       </if>
     </target>
+    
+    <target name="sf-diamonds-envinfo">
+      <if>
+        <istrue value="${sf.spec.publish.enable}"/>
+        <then>
+          <echo>[SF-DIAMONDS-ENVINFO]</echo>
+          <echo message="Send ${build.log.dir}/diamonds_envinfo.xml to Diamonds"/>
+          <exec executable="python">
+		    <arg value="${sf.common.config.dir}/tools/brag/send_xml_to_diamonds.py"/>
+		    <arg value="-u"/>
+		    <arg value="http://${diamonds.host}${diamonds.build.id}"/>
+		    <arg value="-f"/>
+		    <arg value="${build.log.dir}/diamonds_envinfo.xml"/>
+		  </exec>
+        </then>
+      </if>
+    </target>
 
     <target name="sf-diamonds-tag-build">
       <if>
--- a/common/diamonds/config.xml.ftl	Tue Feb 16 17:50:17 2010 +0000
+++ b/common/diamonds/config.xml.ftl	Tue Feb 16 17:57:06 2010 +0000
@@ -39,8 +39,9 @@
         <stage name="release" start="publish-variants" end="final" />
     </stages>
     <targets>
-        <target name="diamonds" template-file="tool.xml.ftl" 
-            logfile="${ant['temp.build.dir']}/build/doc/ivy/tool-dependencies-${ant['build.type']}.xml" ant-properties="true"/>        
+    	<!-- note: replaced by sf-diamonds-envinfo -->
+        <!-- target name="diamonds" template-file="tool.xml.ftl" 
+            logfile="${ant['temp.build.dir']}/build/doc/ivy/tool-dependencies-${ant['build.type']}.xml" ant-properties="true"/ -->
         
         <!-- note: replaced by sf-run-analysis-diamonds -->
         <!-- target name="compile-main" template-file="compile.xml.ftl"
@@ -64,11 +65,12 @@
             logfile="${ant['validate.policy.log']}"/>
         </#if>
 
+        <!-- note: replaced by sf-diamonds-envinfo -->
         <!-- defer will store all the converted output file and sends only if there any other
             stage / target starts to send some data to diamonds -->
-        <target name="check-tool-dependencies" template-file="tool.xml.ftl" 
+        <!-- target name="check-tool-dependencies" template-file="tool.xml.ftl" 
             logfile="${ant['temp.build.dir']}/build/doc/ivy/tool-dependencies-${ant['build.type']}.xml" ant-properties="true"
-            defer="true"/>
+            defer="true"/ -->
             
         <!-- SF specific -->
         <target name="sf-diamonds-tag-build"/>
--- a/common/tools/brag/brag.xsl	Tue Feb 16 17:50:17 2010 +0000
+++ b/common/tools/brag/brag.xsl	Tue Feb 16 17:57:06 2010 +0000
@@ -13,10 +13,10 @@
 	<body>
 	<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)"/>
+	<xsl:variable name="criticalCount" select="count(phase/step/failures[@level='critical']/failure)+sum(phase/step/failures[@level='critical']/@count)"/>
+	<xsl:variable name="majorCount" select="count(phase/step/failures[@level='major']/failure)+sum(phase/step/failures[@level='major']/@count)"/>
+	<xsl:variable name="minorCount" select="count(phase/step/failures[@level='minor']/failure)+sum(phase/step/failures[@level='minor']/@count)"/>
+	<xsl:variable name="unknownCount" select="count(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/failure)+sum(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/@count)"/>
 
 	<h2>
 	Overall BRAGG staus: 
@@ -35,7 +35,7 @@
 	<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>
+	<tr><th>Grand total</th><th><xsl:value-of select="$criticalCount+$majorCount+$minorCount+$unknownCount"/></th></tr>
 	</table>
 
 	<h2>Breakdown by phase/step</h2>
@@ -47,12 +47,27 @@
 		</tr>
 		<xsl:for-each select="step">
 			<tr>
+			<xsl:choose>
+			<xsl:when test="@detailshref">
+			<td colspan='2'>Step: <a><xsl:attribute name="href"><xsl:value-of select="@detailshref"/></xsl:attribute><xsl:value-of select="@name"/></a></td>
+			</xsl:when>
+			<xsl:otherwise>
 			<td colspan='2'>Step: <xsl:value-of select="@name"/></td>
+			</xsl:otherwise>
+			</xsl:choose>
 			</tr>
 			<xsl:for-each select="failures">
 				<tr>
 				<td>Failures: <xsl:value-of select="@level"/></td>
+				
+				<xsl:choose>
+				<xsl:when test="@count">
+				<td>Number: <xsl:value-of select="@count"/></td>
+				</xsl:when>
+				<xsl:otherwise>
 				<td>Number: <xsl:value-of select="count(failure)"/></td>
+				</xsl:otherwise>
+				</xsl:choose>
 				</tr>
 			</xsl:for-each>
 		</xsl:for-each>
@@ -60,48 +75,9 @@
 
 	</table>
 
-	<!-- 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><a><xsl:attribute name="href"><xsl:value-of select="concat('#package', @package)"/></xsl:attribute><xsl:value-of select="@package"/></a></td>
-			<td><xsl:value-of select="count(key('packages', @package))"/></td>
-			</tr>
-		</xsl:for-each>
-		</table>
-
-		<h2>Breakdown by package/severity</h2>
-		<xsl:for-each select="phase/step/failures[@level]/failure[generate-id(.) = generate-id(key('packages', @package))]">
-			<xsl:sort select="@package"/>
-			<xsl:variable name="package" select="@package"/>
-			<a><xsl:attribute name="name"><xsl:value-of select="concat('package', $package)"/></xsl:attribute>
-			<h3><xsl:value-of select="$package"/></h3>
-			</a>
-			<table border="1">
-			<tr><th>Severity</th><th>Count</th></tr>
-			<xsl:for-each select="/buildStatus/phase/step/failures[generate-id(.) = generate-id(key('severities', @level))]">
-				<xsl:variable name="severity" select="@level"/>
-				<tr>
-				<td><a>
-				<xsl:if test="count(/buildStatus/phase/step/failures[@level = $severity]/failure[@package = $package]) != 0">
-					<xsl:attribute name="href"><xsl:value-of select="concat('#', $severity, $package)"/></xsl:attribute>
-				</xsl:if>
-				<xsl:value-of select="$severity"/></a></td>
-				<td><xsl:value-of select="count(key('packageANDseverity', concat($severity, $package)))"/></td>
-				</tr>
-			</xsl:for-each>
-			</table>
-		</xsl:for-each>
-	</xsl:if>
-
 	<h2>Floating failures by phase/step/severity</h2>
 	<xsl:if test="count(phase/step/failures/failure/@package) = count(phase/step/failures/failure)">
-		<p>No errors independent of package</p>
+		<p>No failures to show. Please also check the <a href="../html/index.html">Raptor build summary</a> for details on that part of the build</p>
 	</xsl:if>
 	<xsl:for-each select="phase[count(step/failures/failure/@package) != count(step/failures/failure)]">
 		<h3>Phase: <xsl:value-of select="@name"/></h3>
@@ -126,39 +102,6 @@
 		</xsl:for-each>
 	</xsl:for-each>
 
-	<h2>Package failures by package/severity</h2>
-	<xsl:if test="count(phase/step/failures/failure/@package) = 0">
-		<p>No errors specific to a package</p>
-	</xsl:if>
-	<xsl:for-each select="phase/step/failures[@level]/failure[generate-id(.) = generate-id(key('packages', @package))]">
-		<xsl:sort select="@package"/>
-		<xsl:variable name="package" select="@package"/>
-		<a><xsl:attribute name="name"><xsl:value-of select="concat('package', $package)"/></xsl:attribute>
-		<h3><xsl:value-of select="$package"/></h3>
-		</a>
-		<xsl:for-each select="/buildStatus/phase/step/failures[generate-id(.) = generate-id(key('severities', @level))]">
-			<xsl:variable name="severity" select="@level"/>
-			<xsl:if test="count(/buildStatus/phase/step/failures[@level = $severity]/failure[@package = $package]) != 0">
-				<dl><dt><a><xsl:attribute name="name"><xsl:value-of select="concat($severity, $package)"/></xsl:attribute>
-					<xsl:value-of select="$severity"/> (<xsl:value-of select="count(/buildStatus/phase/step/failures[@level = $severity]/failure[@package = $package])"/>)
-				</a></dt><dd>
-				<ul>
-				<xsl:for-each select="/buildStatus/phase/step/failures[@level = $severity]/failure[@package = $package]">
-					<xsl:sort select="@package"/>
-					<li><xsl:value-of select="effect"/></li>
-					<xsl:if test="@unreported_causes != '0'">
-						<br/>(Too much text to show everything; <xsl:value-of select="@unreported_causes"/> lines not shown.)
-					</xsl:if>
-					<xsl:for-each select="causes">
-						<pre><xsl:value-of select="."/></pre>
-					</xsl:for-each>
-				</xsl:for-each>
-				</ul>
-				</dd></dl>
-			</xsl:if>
-		</xsl:for-each>
-	</xsl:for-each>
-
 	</body>
 	</html>
 </xsl:template>
--- a/common/tools/brag/bragForDiamonds.xsl	Tue Feb 16 17:50:17 2010 +0000
+++ b/common/tools/brag/bragForDiamonds.xsl	Tue Feb 16 17:57:06 2010 +0000
@@ -2,10 +2,10 @@
 
 <!-- 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)"/>
+	<xsl:variable name="criticalCount" select="count(phase/step/failures[@level='critical']/failure)+sum(phase/step/failures[@level='critical']/@count)"/>
+	<xsl:variable name="majorCount" select="count(phase/step/failures[@level='major']/failure)+sum(phase/step/failures[@level='major']/@count)"/>
+	<xsl:variable name="minorCount" select="count(phase/step/failures[@level='minor']/failure)+sum(phase/step/failures[@level='minor']/@count)"/>
+	<xsl:variable name="unknownCount" select="count(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/failure)+sum(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/@count)"/>
 
 	<diamonds-build>
 	<schema>13</schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/brag/uh2brag.pl	Tue Feb 16 17:57:06 2010 +0000
@@ -0,0 +1,74 @@
+#!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 a BRAG-compatible XML summary from an index.html file coming out of the uh parser
+
+use strict;
+
+use Getopt::Long;
+
+my $raptorSummary;
+my $help = 0;
+GetOptions((
+	'index=s' => \$raptorSummary,
+	'help!' => \$help
+));
+
+$help = 1 if (!$raptorSummary);
+if ($help)
+{
+	print "Generate an XML summary of the Raptor build from a summary.csv file\n";
+	print "Usage: perl summarize.pl --index=INDEXFILE\n";
+	exit(0);
+}
+
+my $criticals = 0;
+my $majors = 0;
+my $minors = 0;
+my $unknowns = 0;
+
+# READ INDEX.HTML FILE
+if (open(INDEX, $raptorSummary))
+{
+	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></tr>})
+		{
+			$criticals += $1 if ($1);
+			$majors += $2 if ($2);
+			$minors += $3 if ($3);
+			$unknowns += $4 if ($4);
+		}
+	}
+	close(INDEX);
+}
+
+# Print XML
+print <<_END;
+<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<?xml-stylesheet type='text/xsl' href='brag.xsl'?>
+<buildStatus>
+<phase name="Build">
+<step name=\"Raptor Build\" detailshref=\"../html/index.html\">
+<failures level=\"critical\" count=\"$criticals\"/>
+<failures level=\"major\" count=\"$majors\"/>
+<failures level=\"minor\" count=\"$minors\"/>
+<failures level=\"unknown\" count=\"$unknowns\"/>
+</step>
+</phase>
+</buildStatus>
+_END
+
+exit(0);
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/envinfo.pl	Tue Feb 16 17:57:06 2010 +0000
@@ -0,0 +1,177 @@
+# 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:
+# Dumps environment info such as tools version to cmdline then to a Diamonds file
+
+use strict;
+
+use Getopt::Long;
+
+my $output = "\\output\\logs\\diamonds_envinfo.xml";
+my $help = 0;
+GetOptions((
+	'out=s' => \$output,
+	'help!' => \$help
+));
+
+if ($help)
+{
+	print "Dumps environment info such as tools version to cmdline then to a Diamonds file\n";
+	print "Usage: perl envinfo.pl --out=XMLFILE\n";
+	print "\n";
+	print "XMLFILE is optional, its default is \\output\\logs\\diamonds_envinfo.xml\n";
+	exit(0);
+}
+
+my @environment_info = ();
+
+# Machine name
+push @environment_info, {name=>'Machine', version=>$ENV{'COMPUTERNAME'}};
+
+# OS Name and Version
+my $os_name = 'N.A.';
+my $os_ver = 'N.A.';
+my $os_out = `systeminfo`;
+$os_name = $1 if ($os_out =~ /^OS Name:\s+(.*)/m);
+$os_ver = $1 if ($os_out =~ /^OS Version:\s+(.*)/m);
+push @environment_info, {name=>'OS Name', version=>$os_name};
+push @environment_info, {name=>'OS Version', version=>$os_ver};
+
+# Perl
+my $perl_ver = 'N.A.';
+my $perl_out = `perl -v`;
+$perl_ver = $1 if ($perl_out =~ /This is perl, v(\S+)/m);
+push @environment_info, {name=>'Perl', version=>$perl_ver};
+
+# Python
+my $python_ver = 'N.A.';
+my $python_out = `python -V 2>&1`;
+$python_ver = $1 if ($python_out =~ /^Python\s+(\S+)/m);
+push @environment_info, {name=>'Python', version=>$python_ver};
+
+# Mercurial
+my $hg_ver = 'N.A.';
+my $hg_out = `hg --version`;
+$hg_ver = $1 if ($hg_out =~ /^Mercurial Distributed SCM \(version ([^)]+)\)/m);
+push @environment_info, {name=>'Mercurial', version=>$hg_ver};
+
+# 7-Zip
+my $zip_ver = 'N.A.';
+my $zip_out = `7z`;
+$zip_ver = $1 if ($zip_out =~ /^7-Zip\s+(\S+)\s+Copyright/m);
+push @environment_info, {name=>'7-Zip', version=>$zip_ver};
+
+# Raptor
+my $sbs_ver = 'N.A.';
+my $sbs_out = `sbs -v`;
+$sbs_ver = $1 if ($sbs_out =~ /^sbs version (.*)/m);
+push @environment_info, {name=>'sbs', version=>$sbs_ver};
+
+# Metrowerk Compiler
+my $mwcc_ver = 'N.A.';
+my $mwcc_out = `mwccsym2 -version`;
+$mwcc_ver = $1 if ($mwcc_out =~ /^Version (.*) \(Build/m);
+push @environment_info, {name=>'mwccsym2', version=>$mwcc_ver};
+
+# RVCT 2.2
+my $rvct22_ver = 'N.A.';
+my $rvct22_path = '';
+if (defined $ENV{'SBS_RVCT22BIN'})
+{
+	$rvct22_path = $ENV{'SBS_RVCT22BIN'};
+}
+elsif (defined $ENV{'RVCT22BIN'})
+{
+	$rvct22_path = $ENV{'RVCT22BIN'};
+}
+my $rvct22_cmd = 'armcc 2>&1';
+$rvct22_cmd = "$rvct22_path\\$rvct22_cmd" if ($rvct22_path);
+my $rvct22_out = `$rvct22_cmd`;
+$rvct22_ver = $1 if ($rvct22_out =~ m#ARM/Thumb C/C\+\+ Compiler, RVCT2.2 (.*)#m);
+push @environment_info, {name=>'RVCT2.2', version=>$rvct22_ver};
+
+# RVCT 4.0
+my $rvct40_ver = 'N.A.';
+my $rvct40_path = '';
+if (defined $ENV{'SBS_RVCT40BIN'})
+{
+	$rvct40_path = $ENV{'SBS_RVCT40BIN'};
+}
+elsif (defined $ENV{'RVCT40BIN'})
+{
+	$rvct40_path = $ENV{'RVCT40BIN'};
+}
+my $rvct40_cmd = 'armcc 2>&1';
+$rvct40_cmd = "$rvct40_path\\$rvct40_cmd" if ($rvct40_path);
+my $rvct40_out = `$rvct40_cmd`;
+$rvct40_ver = $1 if ($rvct40_out =~ m#ARM C/C\+\+ Compiler, RVCT4.0 (.*)#m);
+push @environment_info, {name=>'RVCT4.0', version=>$rvct40_ver};
+
+# GCCE 4.4.1
+my $gcc441_ver = 'N.A.';
+my $gcc441_path = '';
+if (defined $ENV{'SBS_GCCE441BIN'})
+{
+	$gcc441_path = $ENV{'SBS_GCCE441BIN'};
+}
+elsif (defined $ENV{'GCCE441BIN'})
+{
+	$gcc441_path = $ENV{'GCCE441BIN'};
+}
+if ($gcc441_path)
+{
+	my $gcc441_cmd = "$gcc441_path\\arm-none-symbianelf-g++ -dumpversion";
+	my $gcc441_out = `$gcc441_cmd`;
+	$gcc441_ver = "4.4.1" if ($gcc441_out =~ /4.4.1/);
+}
+push @environment_info, {name=>'GCC4.4.1', version=>$gcc441_ver};
+
+
+for my $tool_info (@environment_info)
+{
+	print $tool_info->{name} . ": " . $tool_info->{version} . "\n";
+}
+
+
+# write diamonds file
+
+@environment_info = reverse(@environment_info);
+
+my $xml_content = <<_EOX;
+
+<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<diamonds-build>
+ <schema>10</schema>
+  <tools>        
+_HERE_TOOLS_LINES_
+  </tools>
+</diamonds-build>
+_EOX
+
+my $tools_lines = '';
+for my $tool_info (@environment_info)
+{
+	$tools_lines .= "   <tool><name>$tool_info->{name}</name><version>$tool_info->{version}</version></tool>\n";
+}
+
+$xml_content =~ s/_HERE_TOOLS_LINES_/$tools_lines/;
+
+if (open(ENVINFO, ">$output"))
+{
+	print ENVINFO $xml_content;
+	close(ENVINFO);
+	print "Wrote Diamonds file: $output\n";
+}
+else
+{
+	warn "Could not write to file: $output\n";
+}
\ No newline at end of file
--- a/common/tools/raptor/RaptorRecipe.pm	Tue Feb 16 17:50:17 2010 +0000
+++ b/common/tools/raptor/RaptorRecipe.pm	Tue Feb 16 17:57:06 2010 +0000
@@ -205,6 +205,8 @@
 
 sub on_end_buildlog_recipe
 {
+	$::allbldinfs->{$recipe_info->{bldinf}} = 1;
+	
 	if ($recipe_info->{exit} =~ /failed/)
 	{
 		# normalize bldinf path
--- a/common/tools/raptor/uh.pl	Tue Feb 16 17:50:17 2010 +0000
+++ b/common/tools/raptor/uh.pl	Tue Feb 16 17:57:06 2010 +0000
@@ -72,6 +72,8 @@
 $saxhandler->add_observer('RaptorUnreciped', $RaptorUnreciped::reset_status);
 $saxhandler->add_observer('RaptorRecipe', $RaptorRecipe::reset_status);
 
+our $allbldinfs = {};
+
 my $parser = XML::SAX::ParserFactory->parser(Handler=>$saxhandler);
 for (@logfiles)
 {
@@ -80,6 +82,8 @@
 	$parser->parse_uri($_);
 }
 
+my @allpackages = distinct_packages($allbldinfs);
+
 print "Generating HTML...\n";
 
 system("rd /S /Q $outputdir") if (-d $outputdir);
@@ -223,27 +227,37 @@
 print AGGREGATED "</table>\n";
 print AGGREGATED "<br/>\n";
 
-print AGGREGATED "<br/>PACKGE-SPECIFIC FAILURES<br/>\n";
+print AGGREGATED "<br/>PACKAGE-SPECIFIC FAILURES<br/>\n";
 print AGGREGATED "<table border='1'>\n";
 $tableheader = "<tr><th>package</th>";
 for (@severities) { $tableheader .= "<th>$_</th>"; }
 $tableheader .= "</tr>";
 print AGGREGATED "$tableheader\n";
-for my $package (keys %{$recipe_failures_num_by_severity})
+for my $package (@allpackages)
 {
-	print_package_specific_summary($package, $recipe_failures_by_package_severity->{$package});
-	my $packagesummaryhtml = $package;
-	$packagesummaryhtml =~ s,/,_,;
-	$packagesummaryhtml .= ".html";
-	my $packageline = "<tr><td><a href='$packagesummaryhtml'>$package</a></td>";
-	for (@severities)
+	if (defined $recipe_failures_num_by_severity->{$package})
 	{
-		my $failuresbyseverity = 0;
-		$failuresbyseverity = $recipe_failures_num_by_severity->{$package}->{$_} if (defined $recipe_failures_num_by_severity->{$package}->{$_});
-		$packageline .= "<td>$failuresbyseverity</td>";
+		print_package_specific_summary($package, $recipe_failures_by_package_severity->{$package});
+		my $packagesummaryhtml = $package;
+		$packagesummaryhtml =~ s,/,_,;
+		$packagesummaryhtml .= ".html";
+		my $packageline = "<tr><td><a href='$packagesummaryhtml'>$package</a></td>";
+		for (@severities)
+		{
+			my $failuresbyseverity = 0;
+			$failuresbyseverity = $recipe_failures_num_by_severity->{$package}->{$_} if (defined $recipe_failures_num_by_severity->{$package}->{$_});
+			$packageline .= "<td>$failuresbyseverity</td>";
+		}
+		$packageline .= "</tr>";
+		print AGGREGATED "$packageline\n";
 	}
-	$packageline .= "</tr>";
-	print AGGREGATED "$packageline\n";
+	else
+	{
+		my $packageline = "<tr><td>$package</td>";
+		for (@severities) { $packageline .= "<td>0</td>"; }
+		$packageline .= "</tr>";
+		print AGGREGATED "$packageline\n";
+	}
 }
 print AGGREGATED "</table>\n";
 close(AGGREGATED);
@@ -357,4 +371,33 @@
 		print FILE $filecontent;
 		close(FILE);
 	}
+}
+
+sub distinct_packages
+{
+	my ($allbldinfs) = @_;
+	
+	my $allpackages = {};
+	
+	for my $bldinf (keys %{$allbldinfs})
+	{
+		# normalize bldinf path
+		$bldinf = lc($bldinf);
+		$bldinf =~ s,^[A-Za-z]:,,;
+		$bldinf =~ s,[\\],/,g;
+		
+		my $package = '';
+		if ($bldinf =~ m,/((os|mw|app|tools|ostools|adaptation)/[^/]*),)
+		{
+			$package = $1;
+		}
+		else
+		{
+			print "WARNING: can't understand bldinf attribute of recipe: $bldinf. Won't dump to failed recipes file.\n";
+		}
+		
+		$allpackages->{$package} = 1;
+	}
+	
+	return sort {$a cmp $b} keys %{$allpackages};
 }
\ No newline at end of file
--- a/sf-package/CompilerCompatibility_props.ant.xml	Tue Feb 16 17:50:17 2010 +0000
+++ b/sf-package/CompilerCompatibility_props.ant.xml	Tue Feb 16 17:57:06 2010 +0000
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
 <project name="COMPILERCOMPATIBILITY-PROPS">
-  <property name="sf.spec.baseline.location" value="\\bishare\Releases\PDK_3.0.d"/>
+  <property name="sf.spec.baseline.location" value="\\bishare\releases\PDK_3.0.f"/>
 </project>
 
--- a/sf-package/NewGraphicsArchitecture_props.ant.xml	Tue Feb 16 17:50:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="NEWGRAPHICSARCHITECTURE-PROPS">
-  <property name="sf.spec.baseline.location" value="\\bishare\Releases\PDK_3.0.d"/>
-</project>
-
--- a/sf-package/symbian3_props.ant.xml	Tue Feb 16 17:50:17 2010 +0000
+++ b/sf-package/symbian3_props.ant.xml	Tue Feb 16 17:57:06 2010 +0000
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
 <project name="SYMBIAN3-PROPS">
-  <property name="sf.spec.baseline.location" value="\\bishare\Releases\PDK_3.0.d"/>
+  <property name="sf.spec.baseline.location" value="\\bishare\releases\PDK_3.0.f"/>
 </project>