# HG changeset patch # User Dario Sestito # Date 1274892536 -3600 # Node ID 34dcbee2af5e746ceb9b7c0a217caba201b5b1d2 # Parent 106264ed97357cded1f245d2f8f8767a61177009 Fix: Diamonds summary build info should be more related to the raptor build breakdown from the UH parser diff -r 106264ed9735 -r 34dcbee2af5e common/build.postbuild.xml --- a/common/build.postbuild.xml Wed May 26 20:05:06 2010 +0100 +++ b/common/build.postbuild.xml Wed May 26 17:48:56 2010 +0100 @@ -618,14 +618,26 @@ - - - - - ant: antProperties() - raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,config,component,mmp,phase,recipe,file,line]}) - - + + + + + + [SF-RUN-ANALYSIS-DIAMONDS] + + + + + + + + + + + + + + diff -r 106264ed9735 -r 34dcbee2af5e common/diamonds/config.xml.ftl --- a/common/diamonds/config.xml.ftl Wed May 26 20:05:06 2010 +0100 +++ b/common/diamonds/config.xml.ftl Wed May 26 17:48:56 2010 +0100 @@ -39,14 +39,6 @@ - - - - - - @@ -64,18 +56,10 @@ - - - - - \ No newline at end of file diff -r 106264ed9735 -r 34dcbee2af5e common/diamonds/sf-run-analysis-diamonds.xml.ftl --- a/common/diamonds/sf-run-analysis-diamonds.xml.ftl Wed May 26 20:05:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - - 14 - -<#assign raptor_errors=0/> -<#assign raptor_warnings=0/> -<#list raptor_summary as raptor_item> -<#if raptor_item.category = "raptor_error"> - <#assign raptor_errors=raptor_errors+1 /> -<#elseif raptor_item.category = "raptor_warning"> - <#assign raptor_warnings=raptor_warnings+1 /> - - - - - ${raptor_errors} - ${raptor_warnings} - ${ant['sf.job.totalyarperrors']} - - \ No newline at end of file diff -r 106264ed9735 -r 34dcbee2af5e common/tools/uh2diamonds.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/uh2diamonds.pl Wed May 26 17:48:56 2010 +0100 @@ -0,0 +1,90 @@ +# 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: +# Translates uh report (index.html) to a Diamonds file + +use strict; + +use Getopt::Long; + +my $input = "\\output\\logs\\html\\index.html"; +my $output = "\\output\\logs\\diamonds_uh.xml"; +my $help = 0; +GetOptions(( + 'in=s' => \$input, + 'out=s' => \$output, + 'help!' => \$help +)); + +if ($help) +{ + print "Translates uh report (index.html) to a Diamonds file\n"; + print "Usage: perl uh2diamonds.pl [--in=UHINDEX] [--out=XMLFILE]\n"; + print "\n"; + print "UHINDEX is optional, its default is \\output\\logs\\html\\index.html\n"; + print "XMLFILE is optional, its default is \\output\\logs\\diamonds_uh.xml\n"; + exit(0); +} + +my $critical = 0; +my $major = 0; +my $minor = 0; +my $unknown = 0; +my $missing = 0; + +open(INDEX, $input) or die "Can't open $input for reading"; +while () +{ + my $line = $_; + if ($line =~ m,\w+(\d+)(\d+)(\d+)(\d+),) + { + $critical += $1; + $major += $2; + $minor += $3; + $unknown += $4; + } + elsif($line =~ m,.+(\d+)(\d+)(\d+)(\d+)(\d+),) + { + $critical += $1; + $major += $2; + $minor += $3; + $unknown += $4; + $missing += $5; + } +} +close(INDEX); + +my $xml_content = <<_EOX; + + + + 14 + + $critical + $major + $minor + $unknown + $missing + + +_EOX + +if (open(XML, ">$output")) +{ + print XML $xml_content; + close(XML); + print "Wrote Diamonds file: $output\n"; +} +else +{ + warn "Could not write to file: $output\n"; +} \ No newline at end of file