- $iLogFile |
- ";
-
- # prints the build results extracted from old report.html file.
- # Below code looks into the hash for stages whose results(Errors) are already calculated, and proceeds
- # computing results for next $iStage in xml file.
- if (defined ($iStagesFromFile) and defined ($iStagesFromFileInHash{$iLogFile})) {
- $iResultRowHolder = $iResultRowHolder . ${$iStagesFromFileInHash{$iLogFile}}[0];
- }elsif (!getHandleErrors($iLogFile) or "$iLogFile" ne "$iStage") {
- $iResultRowHolder = $iResultRowHolder . "Stage not completed";
- }else {
- foreach (getResults($iLogFile)) {
- undef $iResultRow;
- if ($_->[1] != "0") {
- if (isHTMLFile($iLogFile)) {
- $iResultRow = "[0]) .
- "#errorsBy" .
- getAnchorType($iLogFile) .
- "_$_->[0]\">$_->[0]\ ($_->[1]\) ";
- }
- else {
- $iResultRow = "". $_->[0];
- chomp $iResultRow;
- }
- ++$iCount;
- }
-
- $iResultRowHolder = $iResultRowHolder . $iResultRow;
- }
- # zero errors, means 'None' is displayed
- if ($iCount == "0"){
- $iResultRowHolder = $iResultRowHolder . "None";
- }
- }
-
- $iResultRowHolder = $iResultRowHolder . " | \n";
-
- $iCount = "0";
- # print build results extracted from old report.html file.
- # Below code looks into the hash for stages whose results(Warnings) are already calculated, and proceeds
- # computing results for next $iStage in xml file.
- if (defined ($iStagesFromFile) and defined ($iStagesFromFileInHash{$iLogFile})) {
- $iResultRowHolder = $iResultRowHolder . ${$iStagesFromFileInHash{$iLogFile}}[1];
- }elsif (!getHandleErrors($iLogFile) || "$iLogFile" ne "$iStage") {
- $iResultRowHolder = $iResultRowHolder . "Stage not completed";
- }else {
- foreach (getResults($iLogFile)) {
- undef $iResultRow;
- if ($_->[3] != "0") {
- if (isHTMLFile($iLogFile)) {
- $iResultRow = "[0]\">$_->[0]\ ($_->[3]\) ";
- }
- else {
- $iResultRow = "".$_->[0];
- chomp $iResultRow;
- }
- ++$iCount;
- }
-
-
- $iResultRowHolder = $iResultRowHolder . $iResultRow;
- }
-
- # zero warnings, means 'None' is displayed
- if ($iCount == "0"){
- $iResultRowHolder = $iResultRowHolder . "None";
- }
- }
-
- $iResultRowHolder = $iResultRowHolder . " | \n";
-
- $iCount = "0";
- # print build results extracted from old report.html file.
- # Below code looks into the hash for stages whose results(AdvisoryNotes) are already calculated, and proceeds
- # computing results for next $iStage in xml file.
- if (defined ($iStagesFromFile) and defined ($iStagesFromFileInHash{$iLogFile})) {
- $iResultRowHolder = $iResultRowHolder . ${$iStagesFromFileInHash{$iLogFile}}[2];
- }elsif (!getHandleErrors($iLogFile) || "$iLogFile" ne "$iStage") {
- $iResultRowHolder = $iResultRowHolder . "Stage not completed";
- }else {
- foreach (getResults($iLogFile)) {
- undef $iResultRow;
- if ($_->[5] != "0") {
- if (isHTMLFile($iLogFile)) {
- $iResultRow = "[0]\">$_->[0]\ ($_->[5]\) ";
- }
- else {
- $iResultRow = "".$_->[0];
- chomp $iResultRow;
- }
- ++$iCount;
- $iBraggflag = 1;
- }
-
- $iResultRowHolder = $iResultRowHolder . $iResultRow;
- }
-
- # zero warnings, means 'None' is displayed
- if ($iCount == "0"){
- $iResultRowHolder = $iResultRowHolder . "None";
- }
- }
- $iResultRowHolder = $iResultRowHolder . " | \n | \n
\n";
-
- return $iResultRowHolder;
-}
-##########################################################################
-#
-# Name : extractOldResults()
-# Synopsis: Extracts the old results of different stages which are already generated
-# Inputs : Filename of report.html along with complete path
-# Outputs : Returns a reference to hash whose keys are stages and values are values from html file.
-##########################################################################
-sub extractOldResults {
- my $iFileName = shift @_;
- my $iFlag = 0;
- my @lines;
- my %iStages;
-
- open FILE, "$iFileName" or die "Can't open $iFileName: $!\n";
- @lines =