williamr/scan_antlogs.pl
changeset 4 60053dab7e2a
parent 2 a600c1a596f7
child 9 d565c1ce950a
equal deleted inserted replaced
3:8b87ea768cb8 4:60053dab7e2a
    17 my $pdk_src = "../.."; # path to sf tree - correct from "build/output"
    17 my $pdk_src = "../.."; # path to sf tree - correct from "build/output"
    18 
    18 
    19 my %missing_files;
    19 my %missing_files;
    20 my %damaged_components;
    20 my %damaged_components;
    21 my %excluded_things;
    21 my %excluded_things;
    22 my %abld_import;
       
    23 my %damaged_bldinfs;
    22 my %damaged_bldinfs;
    24 
    23 
    25 sub canonical_path($)
    24 sub canonical_path($)
    26   {
    25   {
    27   my ($path) = @_;
    26   my ($path) = @_;
   105   open FILE, "<$logfile" or print "Error: cannot open $logfile: $!\n" and return;
   104   open FILE, "<$logfile" or print "Error: cannot open $logfile: $!\n" and return;
   106   
   105   
   107   my $line;
   106   my $line;
   108   while ($line = <FILE>)
   107   while ($line = <FILE>)
   109     {
   108     {
   110     # Could not export s:/sf/mw/classicui/commonuisupport/uikon/docs/Uikon_1.2_Caps_Lock_Extension.doc to s:/epoc32/engdoc/application_framework/uikon/uikon_1.2_caps_lock_extension.doc
       
   111     if ($line =~ /^Could not export .*\/(sf\/.*) to .:\/(epoc32\/.*)$/)
       
   112       {
       
   113       my $source = $1;
       
   114       my $exported = $2;
       
   115       if (-e "m:/$exported")
       
   116         {
       
   117         $abld_import{$source} = $exported;
       
   118         }
       
   119       next;
       
   120       }
       
   121     # Source of export does not exist:  s:/sf/mw/messagingmw/messagingfw/msgtests/group/msgerr.ra
   109     # Source of export does not exist:  s:/sf/mw/messagingmw/messagingfw/msgtests/group/msgerr.ra
   122     # Source zip for export does not exist: s:/sf/os/deviceplatformrelease/S60LocFiles/data/96.zip
   110     # Source zip for export does not exist: s:/sf/os/deviceplatformrelease/S60LocFiles/data/96.zip
   123     if ($line =~ /^Source (of|zip for) export does not exist.\s+.*\/(sf\/.*)$/)
   111     if ($line =~ /^Source (of|zip for) export does not exist.\s+.*\/(sf\/.*)$/)
   124       {
   112       {
   125       do_missing_file($2, "??", "source of export");
   113       do_missing_file($2, "??", "source of export");
   147         $damaged_bldinfs{"$parent\t$relative"} = 1;
   135         $damaged_bldinfs{"$parent\t$relative"} = 1;
   148         }
   136         }
   149       do_missing_file("$parent/../$relative", $parent, "#include");
   137       do_missing_file("$parent/../$relative", $parent, "#include");
   150       next;  
   138       next;  
   151       }
   139       }
       
   140     # make.exe: *** No rule to make target `m:/sf/os/security/crypto/weakcrypto/source/symmetric/des.cpp', needed by `m:/epoc32/build/weakcrypto/c_126994d895f12d1a/weak_cryptography_dll/winscw/udeb/des.o'.
       
   141     if ($line =~ /No rule to make target .*(sf\/.*)', needed by .*(epoc32\/.*)'/)
       
   142       {
       
   143       my $missing = $1;
       
   144       my $impact = "building $2";
       
   145       # epoc32/build/weakcrypto/c_126994d895f12d1a/weak_cryptography_dll
       
   146       if ($impact =~ /epoc32\/build\/[^\/]+\/[^\/]+\/([^\/]+)\//)
       
   147         {
       
   148         $impact = "building $1";
       
   149         }
       
   150       do_missing_file($missing, "??", $impact);
       
   151       next;
       
   152       }
   152     }
   153     }
   153     close FILE;
   154     close FILE;
   154   }
   155   }
   155   
   156   
   156   my @logfiles = map(glob,@ARGV);
   157   my @logfiles = map(glob,@ARGV);
   185     print "\t", join("\n\t", sort keys %hash), "\n";
   186     print "\t", join("\n\t", sort keys %hash), "\n";
   186     }
   187     }
   187   print "\nMissing files\n";
   188   print "\nMissing files\n";
   188   foreach my $missing (sort keys %missing_files)
   189   foreach my $missing (sort keys %missing_files)
   189     {
   190     {
   190     my $exported = $abld_import{$missing};
       
   191     $exported = "(not in PDK)" if (!defined $exported);
       
   192     my $reason = $missing_files{$missing};
   191     my $reason = $missing_files{$missing};
   193     my @dirs = split /\//, $missing;
   192     my @dirs = split /\//, $missing;
   194     my $path = shift @dirs;
   193     my $path = shift @dirs;
   195     my $dir;
   194     my $dir;
   196     
   195     
   200         {
   199         {
   201         # still exists at this point
   200         # still exists at this point
   202         $path .= "/$dir";
   201         $path .= "/$dir";
   203         next;
   202         next;
   204         }
   203         }
   205       print "\t$reason\t$path\t\t", join("/", $dir,@dirs), "\t$exported\n";
   204       print "\t$reason\t$path\t\t", join("/", $dir,@dirs), "\n";
   206       last;
   205       last;
   207       }    
   206       }    
   208     }
   207     }
   209   
   208   
   210   print "\nDamaged bld.infs\n";
   209   print "\nDamaged bld.infs\n";