deprecated/buildtools/commonbldutils/sbsv2htmlscanlog/sbsv2scanlog.pm
changeset 655 3f65fd25dfd4
equal deleted inserted replaced
649:02d78c9f018e 655:3f65fd25dfd4
       
     1 #!perl -w
       
     2 # Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description:
       
    15 # summarise an automated build log
       
    16 # documentation available in generic\tools\e32toolp\docs\scanlog.txt
       
    17 # please update the documentation when modifying this file
       
    18 # 
       
    19 #
       
    20 
       
    21 package sbsv2scanlog;
       
    22 
       
    23 use strict;
       
    24 use Carp;
       
    25 use FindBin;		# for FindBin::Bin
       
    26 
       
    27 use lib "$FindBin::Bin/../../tools/build/scanlog"; # For running in source
       
    28 use lib "$FindBin::Bin"; # For running in \tools
       
    29 
       
    30 use Scanlog;
       
    31 
       
    32 # CheckForErrors
       
    33 #
       
    34 # Inputs
       
    35 # $line - Line of text to check
       
    36 #
       
    37 # Outputs
       
    38 # Return true for presence of error in the line
       
    39 # Return false for no error found
       
    40 #
       
    41 # Description
       
    42 # This function matches the input against a known set of Error Strings
       
    43 sub CheckForErrors
       
    44 {
       
    45   my ($line) = @_;
       
    46 
       
    47 
       
    48     # Check Original scanlog rules
       
    49     return &Scanlog::CheckForErrors($line);
       
    50 	
       
    51 	# Not already returned so return false
       
    52 	return 0;
       
    53 }
       
    54 
       
    55 # CheckForRemarks
       
    56 #
       
    57 # Inputs
       
    58 # $iLine - Line of text to check
       
    59 #
       
    60 # Outputs
       
    61 # Return true for presence of Warning in the line according to the warning codes
       
    62 # defined in the checkList array
       
    63 # The list is the current known EABI warnings which are considered to be 
       
    64 # Remarks
       
    65 # Return false for no Warning found
       
    66 #
       
    67 # Description
       
    68 # This function matches the input against a known set of Warning Strings defined
       
    69 # in the array CheckList
       
    70 sub CheckForRemarks
       
    71 {
       
    72     my ($line) = @_;
       
    73 
       
    74     #/sf/app/messaging/email/pop3andsmtpmtm/clientmtms/group/imcm.rls:36:54: warning: no newline at end of file
       
    75     if ($line =~ /:\d+:\d+: warning: no newline at end of file/)
       
    76     {
       
    77       return 1;
       
    78     }
       
    79 
       
    80     # Check Original scanlog rules
       
    81     return &Scanlog::CheckForRemarks($line);
       
    82 
       
    83 
       
    84 	# Not already returned so return false
       
    85     return 0;
       
    86 	
       
    87 }
       
    88 
       
    89 # CheckForWarnings
       
    90 #
       
    91 # Inputs
       
    92 # $iLine - Line of text to check
       
    93 #
       
    94 # Outputs
       
    95 # Return true for presence of Warning in the line
       
    96 # Return false for no Warning found
       
    97 #
       
    98 # Description
       
    99 # This function matches the input against a known set of Warning Strings
       
   100 sub CheckForWarnings
       
   101 {
       
   102   my ($line) = @_;
       
   103 
       
   104     # Check Original scanlog rules
       
   105     return &Scanlog::CheckForWarnings($line);
       
   106 
       
   107 	# Not already returned so return false
       
   108 	return 0;
       
   109 }
       
   110 
       
   111 # CheckForIgnore
       
   112 #
       
   113 # Inputs
       
   114 # $iLine - Line of text to check
       
   115 #
       
   116 # Outputs
       
   117 # Return true if line can be ignored
       
   118 # Return false if line cannot be ignored
       
   119 #
       
   120 # Description
       
   121 # This function matches the input against a known set of Warning Strings which can be ignored
       
   122 sub CheckForIgnore
       
   123 {
       
   124   my ($line) = @_;
       
   125   
       
   126     # Check Original scanlog rules
       
   127     return &Scanlog::CheckForIgnore($line);
       
   128 	
       
   129 	# Not already returned so return false
       
   130 	return 0;
       
   131 }
       
   132 
       
   133 
       
   134 
       
   135 
       
   136 # CheckForNotBuilt
       
   137 #
       
   138 # Inputs
       
   139 # $iLine - Line of text to check
       
   140 #
       
   141 # Outputs
       
   142 # Return true for presence of Warning in the line
       
   143 # Return false for no Warning found
       
   144 # $iNotBuilt - Name of thing not built
       
   145 #
       
   146 # Description
       
   147 # This function matches the input against a known set of Strings for things not built
       
   148 sub CheckForNotBuilt
       
   149 {
       
   150   my ($line) = @_;
       
   151   
       
   152     # Check Original scanlog rules
       
   153     return &Scanlog::CheckForNotBuilt($line);
       
   154 	
       
   155 	# Not already returned so return false
       
   156 	return 0;
       
   157 }
       
   158 
       
   159 # CheckForMissing
       
   160 #
       
   161 # Inputs
       
   162 # $iLine - Line of text to check
       
   163 #
       
   164 # Outputs
       
   165 # Return true for presence of Warning in the line
       
   166 # Return false for no Warning found
       
   167 # $iNotBuilt - Name of thing not built
       
   168 #
       
   169 # Description
       
   170 # This function matches the input against a known set of Strings for things not built
       
   171 sub CheckForMissing
       
   172 {
       
   173   my ($line) = @_;
       
   174   
       
   175     # Check Original scanlog rules
       
   176     return &Scanlog::CheckForMissing($line);
       
   177 	
       
   178 	# Not already returned so return false
       
   179 	return 0;
       
   180 }
       
   181 
       
   182 # CheckForRealTimeErrors
       
   183 #
       
   184 # Inputs
       
   185 # $iLine - Line of text to check
       
   186 #
       
   187 # Outputs
       
   188 # Return true for presence of a Real Time Error in the line
       
   189 #        plus string detailing error (if available)
       
   190 # Return false for no Real Time Error found
       
   191 #
       
   192 # Description
       
   193 # This function matches the input against a known set of Error Strings
       
   194 # At the time of adding this subroutine, such error strings were only reported by P4GetSource.pm
       
   195 # Scripts calling this subroutine should note that, for example, lines beginning with "ERROR:" will
       
   196 # also be considered to be errors by subroutine CheckForErrors, above. 
       
   197 sub CheckForRealTimeErrors
       
   198 {
       
   199   my ($line) = @_;
       
   200 
       
   201     # Check Original scanlog rules
       
   202     return &Scanlog::CheckForRealTimeErrors($line);
       
   203 	
       
   204 	# Not already returned so return False
       
   205 	return 0;
       
   206 }
       
   207 
       
   208 
       
   209 
       
   210 # CheckForMigrationNotes
       
   211 #
       
   212 # Inputs
       
   213 # $iLine - Line of text to check
       
   214 #
       
   215 # Outputs
       
   216 # Return true for presence of Migration_Note in the line
       
   217 # Return false for no Migration_Note found
       
   218 #
       
   219 # Description
       
   220 # This function matches the input against a known set of Migration_Note Strings
       
   221 sub CheckForMigrationNotes
       
   222 {
       
   223   my ($line,$component) = @_;
       
   224 
       
   225   if ($component =~ /STLPORT/i)
       
   226   {
       
   227     # ../../src/iostream.cpp:164: warning: 'result' might be used uninitialized in this function 
       
   228     if ($line =~ /:\d+: warning:.*?might be used uninitialized in this function/)
       
   229     {
       
   230       return 1;
       
   231     }
       
   232   }
       
   233 
       
   234   #cpp: file.h:48:8: warning: extra tokens at end of #endif directive
       
   235   if ($line =~ /:\d+:\d+: warning: extra tokens at end of #endif directive/)
       
   236   {
       
   237     return 1;
       
   238   }
       
   239 
       
   240   #raptor/lib/flm/export.flm:56: warning: overriding commands for target `S:/epoc32/rom/include/midp20_installer.iby'
       
   241   if ($line =~ /:\d+: warning: overriding commands for target/)
       
   242   {
       
   243     return 1;
       
   244   }
       
   245   
       
   246   #raptor/lib/flm/export.flm:56: warning: ignoring old commands for target `S:/epoc32/rom/include/midp20_installer.iby'
       
   247   if ($line =~ /:\d+: warning: ignoring old commands for target/)
       
   248   {
       
   249     return 1;
       
   250   }
       
   251 
       
   252   #\sf\app\techview\techviewplat\techviewuiklaf\resource\eikcoctl.rls(38) : Warning: (003) rls item redefined.
       
   253   if ($line =~ /\(\d+\)\s+: Warning: (003) rls item redefined/)
       
   254   {
       
   255     return 1;
       
   256   }
       
   257 
       
   258     # Check Original scanlog rules
       
   259     return &Scanlog::CheckForMigrationNotes($line);
       
   260 
       
   261     # Not already returned so return False
       
   262     return 0;
       
   263 }
       
   264 
       
   265 # CheckForComponentExitCodesToMigrate
       
   266 #
       
   267 # Inputs
       
   268 # $iLine - Line of text to check
       
   269 # $component - Current Component
       
   270 #
       
   271 # Outputs
       
   272 # Return true for to ignore this special component error
       
   273 # Return false for to not ignore this special component error
       
   274 #
       
   275 # Description
       
   276 # This function matches the input against a known set of Components and Strings to ignore the later non zero exit code of.
       
   277 sub CheckForComponentExitCodesToMigrate
       
   278 {
       
   279   my ($line,$component) = @_;
       
   280 
       
   281   if ($component =~ /Integrator ARM1136 Core Module/ || $component =~ /OMAP H2 BSP|omaph2bsp/ )
       
   282   {
       
   283     # M://epoc32/tools/makefile_templates/base/bootstrap.mk:213: *** missing `endef', unterminated `define'.  Stop.
       
   284     # if ($line =~ /\/epoc32\/tools\/makefile_templates\/base\/bootstrap\.mk:\d+: \*\*\* missing `endef', unterminated `define'\.  Stop\./)
       
   285     if ($line =~ /\/epoc32\/tools\/makefile_templates\/base\/bootstrap\.mk:\d+: \*\*\* multiple target patterns\.  Stop\./)
       
   286     {
       
   287       return 1;
       
   288     }
       
   289     #/bin/sh: make: command not found
       
   290     if ($line =~ /\/bin\/sh: make: command not found/)
       
   291     {
       
   292       return 1;
       
   293     }
       
   294   } else {
       
   295     return 0;
       
   296   }
       
   297 }
       
   298 
       
   299 # CheckForAdvisoryNotes
       
   300 #
       
   301 # Inputs
       
   302 # $iLine - Line of text to check
       
   303 #
       
   304 # Outputs
       
   305 # Return true if line can be ignored
       
   306 # Return false if line cannot be ignored
       
   307 #
       
   308 # Description
       
   309 # This function matches the input against a known set of Strings
       
   310 sub CheckForAdvisoryNotes
       
   311 {
       
   312   my ($line) = @_;
       
   313   
       
   314     # Check Original scanlog rules
       
   315     return &Scanlog::CheckForAdvisoryNotes($line);
       
   316 	
       
   317 	# Not already returned so return false
       
   318 	return 0;
       
   319 }
       
   320 1;