diff -r 000000000000 -r 83f4b4db085c bldsystemtools/commonbldutils/GenResult/faults.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bldsystemtools/commonbldutils/GenResult/faults.tmpl Tue Feb 02 01:39:43 2010 +0200 @@ -0,0 +1,85 @@ +[@--# Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# 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: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Template processed by GenDiamondsXml.pm +# +#--@] + + + [@--$ENV{DiamondsSchemaNum}--@] + [@-- + use myutils; + use FaultsData; + my $iDir = &myutils::getiDir(); + my $iSnapshot = &myutils::getiSnapshot(); + my $iProduct = &myutils::getiProduct(); + my $iLinkPath = &myutils::getiLinkPath(); + my ($errorCount,$warningCount,$AdvNotesCount) = (0,0,0); + my @temp = FaultsData::stageSummary($iDir, $iSnapshot, $iProduct, $iLinkPath, $iStage); + my @tempArr; + if( -e "faultCount") + { + open(FAULTCOUNT,"; + close(FAULTCOUNT); + $errorCount = trim ($tempArr[0]); + $warningCount = trim ($tempArr[1]); + $AdvNotesCount = trim ($tempArr[2]); + } + else + { + @tempArr = (0,0,0); + } + + $OUT .= ""; + if ($temp[0][0]) + { + foreach my $t (@temp) + { + $OUT .= + " + + @$t[0]#$iStage + "; + if (@$t[1]) {$OUT .= " @$t[1]\n";} + if (@$t[3]) {$OUT .= " @$t[3]\n";} + if (@$t[5]) {$OUT .= " @$t[5]\n";} + $OUT .= " \n"; + + $errorCount = @$t[1] + $errorCount; + $warningCount = @$t[3] + $warningCount; + $AdvNotesCount = @$t[5] + $AdvNotesCount; + } + } + $OUT .= " $errorCount\n"; + $OUT .= " $warningCount\n"; + $OUT .= " $AdvNotesCount\n"; + $OUT .= " "; + + #save the error numbers until now + open(FAULTCOUNT,">faultCount") or warn "FAULTCOUNT:$!"; + print FAULTCOUNT "$errorCount\n"; + print FAULTCOUNT "$warningCount\n"; + print FAULTCOUNT "$AdvNotesCount\n"; + close (FAULTCOUNT); + +sub trim +{ + my $string = shift; + $string =~ s/^\s+//; + $string =~ s/\s+$//; + return $string; +} + --@] + +